From d89c69de98bf90fb51e48d473889b1d09b5a5668 Mon Sep 17 00:00:00 2001 From: KodrAus Date: Mon, 8 May 2023 08:35:02 +1000 Subject: [PATCH 1/2] hard deprecate Timestamp::to_unix_nanos --- src/timestamp.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/timestamp.rs b/src/timestamp.rs index 2f95ac4e..699f829a 100644 --- a/src/timestamp.rs +++ b/src/timestamp.rs @@ -137,20 +137,14 @@ impl Timestamp { ) } - #[deprecated(note = "use `to_unix` instead")] + #[deprecated(note = "use `to_unix` instead; this method will be removed in a future release")] /// Get the number of fractional nanoseconds in the Unix timestamp. /// /// This method is deprecated and probably doesn't do what you're expecting it to. /// It doesn't return the timestamp as nanoseconds since the Unix epoch, it returns /// the fractional seconds of the timestamp. pub const fn to_unix_nanos(&self) -> u32 { - // NOTE: This method never did what it said on the tin: instead of - // converting the timestamp into nanos it simply returned the nanoseconds - // part of the timestamp. - // - // We can't fix the behavior because the return type is too small to fit - // a useful value for nanoseconds since the epoch. - self.nanos + panic!("`Timestamp::to_unix_nanos` is deprecated and will be removed: use `Timestamp::to_unix` instead") } } From 147d4b331465d95548609697af2acb0f13a3f098 Mon Sep 17 00:00:00 2001 From: KodrAus Date: Mon, 8 May 2023 11:23:07 +1000 Subject: [PATCH 2/2] update build agents --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d306efd..f25ccc87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,24 +22,24 @@ jobs: strategy: matrix: exclude: - - os: macos-10.15 + - os: macos-latest rust_target: x86_64-gnu - - os: macos-10.15 + - os: macos-latest rust_target: x86_64-msvc - - os: windows-2019 + - os: windows-latest rust_target: x86_64-apple-darwin - - os: ubuntu-20.04 + - os: ubuntu-latest rust_target: x86_64-msvc - - os: ubuntu-20.04 + - os: ubuntu-latest rust_target: x86_64-apple-darwin channel: - stable - beta - nightly os: - - macos-10.15 - - ubuntu-20.04 - - windows-2019 + - macos-latest + - ubuntu-latest + - windows-latest rust_target: - x86_64-gnu - x86_64-msvc @@ -69,7 +69,7 @@ jobs: stable: name: "Tests / Stable" - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab @@ -79,7 +79,7 @@ jobs: msrv: name: "Tests / MSRV" - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab