Skip to content

Commit b0b868e

Browse files
Update stable Rust and typos (#132)
1 parent 858da7d commit b0b868e

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ env:
33
# version like 1.70. Note that we only specify MAJOR.MINOR and not PATCH so that bugfixes still
44
# come automatically. If the version specified here is no longer the latest stable version,
55
# then please feel free to submit a PR that adjusts it along with the potential clippy fixes.
6-
RUST_STABLE_VER: "1.83" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7
6+
RUST_STABLE_VER: "1.84" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7
77
# The purpose of checking with the minimum supported Rust toolchain is to detect its staleness.
88
# If the compilation fails, then the version specified here needs to be bumped up to reality.
99
# Be sure to also update the rust-version property in the workspace Cargo.toml file,
@@ -324,4 +324,4 @@ jobs:
324324
- uses: actions/checkout@v4
325325

326326
- name: check typos
327-
uses: crate-ci/typos@v1.28.4
327+
uses: crate-ci/typos@v1.29.4

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ version = "0.2.2"
1313
edition = "2021"
1414
# Keep in sync with RUST_MIN_VER in .github/workflows/ci.yml, with the relevant README.md files
1515
# and with the MSRV in the `Unreleased` section of CHANGELOG.md.
16+
# When updating to 1.83 or later, update `color/src/flags.rs` and remove this note.
17+
# When updating to 1.84 or later, update `color/src/floatfuncs.rs` and remove this note.
1618
rust-version = "1.82"
1719
license = "Apache-2.0 OR MIT"
1820
repository = "https://github.com/linebender/color"

color/src/floatfuncs.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
// Copyright 2024 the Color Authors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

4+
// In Rust 1.84 (https://github.com/rust-lang/rust/pull/131304), `abs` and
5+
// `copysign` were added to `core`, so we no longer need these forwarded to
6+
// libm.
7+
#![cfg_attr(
8+
not(feature = "std"),
9+
allow(dead_code, reason = "abs and copysign were added to core in 1.84")
10+
)]
11+
412
//! Shims for math functions that ordinarily come from std.
513
614
/// Defines a trait that chooses between libstd or libm implementations of float methods.
@@ -35,10 +43,12 @@ macro_rules! define_float_funcs {
3543
}
3644

3745
define_float_funcs! {
46+
// This is not needed once the MSRV is 1.84 or later.
3847
fn abs(self) -> Self => fabsf;
3948
fn atan2(self, other: Self) -> Self => atan2f;
4049
fn cbrt(self) -> Self => cbrtf;
4150
fn ceil(self) -> Self => ceilf;
51+
// This is not needed once the MSRV is 1.84 or later.
4252
fn copysign(self, sign: Self) -> Self => copysignf;
4353
fn floor(self) -> Self => floorf;
4454
fn hypot(self, other: Self) -> Self => hypotf;

0 commit comments

Comments
 (0)