From b2c775f2283b6d975fe9b30c0d448ece98c4d341 Mon Sep 17 00:00:00 2001 From: francescocarzaniga Date: Fri, 25 Sep 2020 00:08:35 +0200 Subject: [PATCH] Integer conversion on Solaris and Illumos (#278) Fix illumos support. --- .github/workflows/build.yaml | 8 ++++++-- src/utc_offset.rs | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d21c31e414..6396197184 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,8 +15,7 @@ jobs: rust: [1.32.0, 1.36.0, stable] target: - { triple: x86_64-unknown-netbsd, std: true } - # Illumos target does not exist until Rust 1.47. - # - { triple: x86_64-unknown-illumos, std: true } + - { triple: x64-sun-solaris, std: true } - { triple: wasm32-wasi, std: true } - { triple: thumbv7em-none-eabihf, std: false } exclude: @@ -26,6 +25,11 @@ jobs: - # WASI target did not exist at the time rust: 1.32.0 target: { triple: wasm32-wasi, std: true } + - # Solaris target did not exist in previous rust + rust: 1.32.0 + target: { triple: x86-sun-solaris, std: true } + - rust: 1.36.0 + target: { triple: x86-sun-solaris, std: true } steps: - name: Checkout sources diff --git a/src/utc_offset.rs b/src/utc_offset.rs index 6bde13a48b..a7eb50e51a 100644 --- a/src/utc_offset.rs +++ b/src/utc_offset.rs @@ -378,6 +378,7 @@ fn try_local_offset_at(datetime: OffsetDateTime) -> Option { #[cfg(any(target_os = "solaris", target_os = "illumos"))] { use crate::Date; + use standback::convert::TryFrom; let mut tm = tm; if tm.tm_sec == 60 {