From 59bc0bfd26e477178fee5b2ab959a8066e261710 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Mon, 23 Dec 2019 17:21:46 +0100 Subject: [PATCH] link to core libs instead of std libs where possible --- README.md | 16 ++++++------- src/lib.rs | 16 ++++++------- src/macros_frac.rs | 4 ++-- src/macros_from_to.rs | 4 ++-- src/macros_no_frac.rs | 24 +++++++++---------- src/macros_round.rs | 10 ++++---- src/traits.rs | 54 +++++++++++++++++++++---------------------- 7 files changed, 64 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 931aea9..0082924 100644 --- a/README.md +++ b/README.md @@ -234,8 +234,8 @@ additional terms or conditions. [*typenum* crate]: https://crates.io/crates/typenum [LICENSE-APACHE]: https://www.apache.org/licenses/LICENSE-2.0 [LICENSE-MIT]: https://opensource.org/licenses/MIT -[`Binary`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Binary.html -[`Display`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html +[`Binary`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html +[`Display`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html [`FixedI128`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI128.html [`FixedI16`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI16.html [`FixedI32`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI32.html @@ -247,20 +247,20 @@ additional terms or conditions. [`FixedU64`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedU64.html [`FixedU8`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedU8.html [`FromFixed`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.FromFixed.html -[`FromStr`]: https://doc.rust-lang.org/nightly/std/str/trait.FromStr.html -[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html +[`FromStr`]: https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html +[`From`]: https://doc.rust-lang.org/nightly/core/convert/trait.From.html [`I20F12`]: https://docs.rs/fixed/0.5.0/fixed/types/type.I20F12.html [`I4F12`]: https://docs.rs/fixed/0.5.0/fixed/types/type.I4F12.html [`I4F4`]: https://docs.rs/fixed/0.5.0/fixed/types/type.I4F4.html -[`Into`]: https://doc.rust-lang.org/nightly/std/convert/trait.Into.html +[`Into`]: https://doc.rust-lang.org/nightly/core/convert/trait.Into.html [`LossyFrom`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.LossyFrom.html [`LossyInto`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.LossyInto.html -[`LowerHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.LowerHex.html -[`Octal`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Octal.html +[`LowerHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html +[`Octal`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html [`ToFixed`]: https://docs.rs/fixed/0.5.0/fixed/traits/trait.ToFixed.html [`U12`]: https://docs.rs/fixed/0.5.0/fixed/types/extra/type.U12.html [`U20F12`]: https://docs.rs/fixed/0.5.0/fixed/types/type.U20F12.html -[`UpperHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.UpperHex.html +[`UpperHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html [`bf16`]: https://docs.rs/half/^1/half/struct.bf16.html [`checked_from_num`]: https://docs.rs/fixed/0.5.0/fixed/struct.FixedI32.html#method.checked_from_num [`f16`]: https://docs.rs/half/^1/half/struct.f16.html diff --git a/src/lib.rs b/src/lib.rs index 37b3e8c..2f0cc00 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -188,8 +188,8 @@ additional terms or conditions. [*typenum* crate]: https://crates.io/crates/typenum [LICENSE-APACHE]: https://www.apache.org/licenses/LICENSE-2.0 [LICENSE-MIT]: https://opensource.org/licenses/MIT -[`Binary`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Binary.html -[`Display`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html +[`Binary`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Binary.html +[`Display`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html [`FixedI128`]: struct.FixedI128.html [`FixedI16`]: struct.FixedI16.html [`FixedI32`]: struct.FixedI32.html @@ -201,20 +201,20 @@ additional terms or conditions. [`FixedU64`]: struct.FixedU64.html [`FixedU8`]: struct.FixedU8.html [`FromFixed`]: traits/trait.FromFixed.html -[`FromStr`]: https://doc.rust-lang.org/nightly/std/str/trait.FromStr.html -[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html +[`FromStr`]: https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html +[`From`]: https://doc.rust-lang.org/nightly/core/convert/trait.From.html [`I20F12`]: types/type.I20F12.html [`I4F12`]: types/type.I4F12.html [`I4F4`]: types/type.I4F4.html -[`Into`]: https://doc.rust-lang.org/nightly/std/convert/trait.Into.html +[`Into`]: https://doc.rust-lang.org/nightly/core/convert/trait.Into.html [`LossyFrom`]: traits/trait.LossyFrom.html [`LossyInto`]: traits/trait.LossyInto.html -[`LowerHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.LowerHex.html -[`Octal`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Octal.html +[`LowerHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.LowerHex.html +[`Octal`]: https://doc.rust-lang.org/nightly/core/fmt/trait.Octal.html [`ToFixed`]: traits/trait.ToFixed.html [`U12`]: types/extra/type.U12.html [`U20F12`]: types/type.U20F12.html -[`UpperHex`]: https://doc.rust-lang.org/nightly/std/fmt/trait.UpperHex.html +[`UpperHex`]: https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html [`bf16`]: https://docs.rs/half/^1/half/struct.bf16.html [`checked_from_num`]: struct.FixedI32.html#method.checked_from_num [`f16`]: https://docs.rs/half/^1/half/struct.f16.html diff --git a/src/macros_frac.rs b/src/macros_frac.rs index b0c875b..41ed646 100644 --- a/src/macros_frac.rs +++ b/src/macros_frac.rs @@ -149,7 +149,7 @@ assert_eq!(Fix::max_value().checked_mul(Fix::from_num(1)), Some(Fix::max_value() assert_eq!(Fix::max_value().checked_mul(Fix::from_num(2)), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_mul(self, rhs: $Fixed) -> Option<$Fixed> { @@ -173,7 +173,7 @@ assert_eq!(Fix::max_value().checked_div(Fix::from_num(1)), Some(Fix::max_value() assert_eq!(Fix::max_value().checked_div(Fix::from_num(1) / 2), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_div(self, rhs: $Fixed) -> Option<$Fixed> { diff --git a/src/macros_from_to.rs b/src/macros_from_to.rs index f96b12b..131def9 100644 --- a/src/macros_from_to.rs +++ b/src/macros_from_to.rs @@ -242,7 +242,7 @@ assert!(Fix::checked_from_num(2e38).is_none()); assert!(Fix::checked_from_num(std::f64::NAN).is_none()); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None [`ToFixed`]: traits/trait.ToFixed.html [`bf16`]: https://docs.rs/half/^1.2/half/struct.bf16.html [`f16` feature]: index.html#optional-features @@ -329,7 +329,7 @@ assert_eq!(one_point_625.checked_to_num::(), Some(1.625f32)); ``` [`FromFixed`]: traits/trait.FromFixed.html -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None [`bf16`]: https://docs.rs/half/^1.2/half/struct.bf16.html [`checked_from_fixed`]: traits/trait.FromFixed.html#tymethod.checked_from_fixed [`f16` feature]: index.html#optional-features diff --git a/src/macros_no_frac.rs b/src/macros_no_frac.rs index 213e1cf..9c08281 100644 --- a/src/macros_no_frac.rs +++ b/src/macros_no_frac.rs @@ -568,7 +568,7 @@ assert_eq!(Fix::from_num(5).checked_neg(), None);", " ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_neg(self) -> Option<$Fixed> { @@ -589,7 +589,7 @@ assert_eq!((Fix::max_value() - one).checked_add(one), Some(Fix::max_value())); assert_eq!(Fix::max_value().checked_add(one), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_add(self, rhs: $Fixed) -> Option<$Fixed> { @@ -610,7 +610,7 @@ assert_eq!((Fix::min_value() + one).checked_sub(one), Some(Fix::min_value())); assert_eq!(Fix::min_value().checked_sub(one), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_sub(self, rhs: $Fixed) -> Option<$Fixed> { @@ -631,7 +631,7 @@ assert_eq!(Fix::max_value().checked_mul_int(1), Some(Fix::max_value())); assert_eq!(Fix::max_value().checked_mul_int(2), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_mul_int(self, rhs: $Inner) -> Option<$Fixed> { @@ -664,7 +664,7 @@ assert_eq!(Fix::from_num(1).checked_div_int(0), None); }, "``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_div_int(self, rhs: $Inner) -> Option<$Fixed> { @@ -698,7 +698,7 @@ assert_eq!(Fix::from_num(1).checked_rem_int(0), None); }, "``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_rem_int(self, rhs: $Inner) -> Option<$Fixed> { @@ -731,7 +731,7 @@ assert_eq!(Fix::min_value().checked_div_int(-1), None); }, "``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_div_euclid_int(self, rhs: $Inner) -> Option<$Fixed> { @@ -764,7 +764,7 @@ assert_eq!(Fix::min_value().checked_rem_euclid_int(-1), None); }, "``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_rem_euclid_int(self, rhs: $Inner) -> Option<$Fixed> { @@ -785,7 +785,7 @@ assert_eq!((Fix::from_num(1) / 2).checked_shl(3), Some(Fix::from_num(4))); assert_eq!((Fix::from_num(1) / 2).checked_shl(", $s_nbits, "), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_shl(self, rhs: u32) -> Option<$Fixed> { @@ -806,7 +806,7 @@ assert_eq!(Fix::from_num(4).checked_shr(3), Some(Fix::from_num(1) / 2)); assert_eq!(Fix::from_num(4).checked_shr(", $s_nbits, "), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_shr(self, rhs: u32) -> Option<$Fixed> { @@ -830,7 +830,7 @@ assert_eq!(Fix::from_num(-5).checked_abs(), Some(Fix::from_num(5))); assert_eq!(Fix::min_value().checked_abs(), None); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_abs(self) -> Option<$Fixed> { @@ -858,7 +858,7 @@ assert_eq!(three_eights.checked_next_power_of_two(), Some(half)); assert!(Fix::max_value().checked_next_power_of_two().is_none()); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_next_power_of_two(self) -> Option<$Fixed> { diff --git a/src/macros_round.rs b/src/macros_round.rs index 78fb22d..699c52f 100644 --- a/src/macros_round.rs +++ b/src/macros_round.rs @@ -318,7 +318,7 @@ assert_eq!(Fix::from_num(2.5).checked_ceil(), Some(Fix::from_num(3))); "assert!(Fix::max_value().checked_ceil().is_none()); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_ceil(self) -> Option<$Fixed> { @@ -368,9 +368,9 @@ assert!(AllFrac::min_value().checked_floor().is_none()); if_signed_unsigned! { $Signedness, " -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None", +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None", " -[`Some`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.Some", +[`Some`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.Some", }, " "; @@ -400,7 +400,7 @@ assert_eq!(Fix::from_num(2.5).checked_round(), Some(Fix::from_num(3))); "assert!(Fix::max_value().checked_round().is_none()); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_round(self) -> Option<$Fixed> { @@ -423,7 +423,7 @@ assert_eq!(Fix::from_num(3.5).checked_round_ties_to_even(), Some(Fix::from_num(4 assert!(Fix::max_value().checked_round_ties_to_even().is_none()); ``` -[`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None +[`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None "; #[inline] pub fn checked_round_ties_to_even(self) -> Option<$Fixed> { diff --git a/src/traits.rs b/src/traits.rs index f6faa52..9e5bbca 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -82,7 +82,7 @@ depending on the crate’s [optional features]. [`Deserialize`]: https://docs.rs/serde/^1/serde/de/trait.Deserialize.html [`Fixed`]: trait.Fixed.html -[`PartialOrd`]: https://doc.rust-lang.org/nightly/std/cmp/trait.PartialOrd.html +[`PartialOrd`]: https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html [`Serialize`]: https://docs.rs/serde/^1/serde/ser/trait.Serialize.html [`bf16`]: https://docs.rs/half/^1/half/struct.bf16.html [`f16`]: https://docs.rs/half/^1/half/struct.f16.html @@ -202,8 +202,8 @@ depending on the crate’s [optional features]. /// [`FixedU64`]: ../struct.FixedU64.html /// [`FixedU8`]: ../struct.FixedU8.html /// [`FixedUnsigned`]: trait.FixedUnsigned.html -/// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None -/// [`TryFrom`]: https://doc.rust-lang.org/nightly/std/convert/trait.TryFrom.html +/// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None +/// [`TryFrom`]: https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html /// [`i16`]: https://doc.rust-lang.org/nightly/std/primitive.i16.html /// [`i8`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html /// [`u16`]: https://doc.rust-lang.org/nightly/std/primitive.u16.html @@ -308,7 +308,7 @@ where /// /// Returns the same value as [`src.checked_to_fixed()`][`checked_to_fixed`]. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None /// [`checked_to_fixed`]: trait.ToFixed.html#tymethod.checked_to_fixed fn checked_from_num(src: Src) -> Option; @@ -317,7 +317,7 @@ where /// /// Returns the same value as [`Dst::checked_from_fixed(self)`][`checked_from_fixed`]. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None /// [`checked_from_fixed`]: trait.FromFixed.html#tymethod.checked_from_fixed fn checked_to_num(self) -> Option; @@ -476,25 +476,25 @@ where /// Checked ceil. Rounds to the next integer towards +∞, returning /// [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_ceil(self) -> Option; /// Checked floor. Rounds to the next integer towards −∞, returning /// [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_floor(self) -> Option; /// Checked round. Rounds to the nearest integer, with ties /// rounded away from zero, returning [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_round(self) -> Option; /// Checked round. Rounds to the nearest integer, with ties /// rounded to even, returning [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_round_ties_to_even(self) -> Option; /// Saturating ceil. Rounds to the next integer towards +∞, @@ -605,74 +605,74 @@ where /// Checked negation. Returns the negated value, or [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_neg(self) -> Option; /// Checked addition. Returns the sum, or [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_add(self, rhs: Self) -> Option; /// Checked subtraction. Returns the difference, or [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_sub(self, rhs: Self) -> Option; /// Checked multiplication. Returns the product, or [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_mul(self, rhs: Self) -> Option; /// Checked division. Returns the quotient, or [`None`] if the /// divisor is zero or on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_div(self, rhs: Self) -> Option; /// Checked multiplication by an integer. Returns the product, or /// [`None`] on overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_mul_int(self, rhs: Self::Bits) -> Option; /// Checked division by an integer. Returns the quotient, or /// [`None`] if the divisor is zero or if the division results in /// overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_div_int(self, rhs: Self::Bits) -> Option; /// Checked fixed-point remainder for division by an integer. /// Returns the remainder, or [`None`] if the divisor is zero or /// if the division results in overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_rem_int(self, rhs: Self::Bits) -> Option; /// Checked Euclidean division by an integer. Returns the /// quotient, or [`None`] if the divisor is zero or if the /// division results in overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_div_euclid_int(self, rhs: Self::Bits) -> Option; /// Checked fixed-point remainder for Euclidean division by an /// integer. Returns the remainder, or [`None`] if the divisor is /// zero or if the division results in overflow. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_rem_euclid_int(self, rhs: Self::Bits) -> Option; /// Checked shift left. Returns the shifted number, or [`None`] if /// `rhs` ≥ the number of bits. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_shl(self, rhs: u32) -> Option; /// Checked shift right. Returns the shifted number, or [`None`] /// if `rhs` ≥ the number of bits. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_shr(self, rhs: u32) -> Option; /// Saturated negation. Returns the negated value, saturating on overflow. @@ -959,7 +959,7 @@ pub trait FixedSigned: Fixed + Neg { /// /// Overflow can only occur when trying to find the absolute value of the minimum value. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_abs(self) -> Option; /// Saturating absolute value. Returns the absolute value, saturating on overflow. @@ -1011,7 +1011,7 @@ pub trait FixedUnsigned: Fixed { /// Returns the smallest power of two that is ≥ `self`, or [`None`] if the /// next power of two is too large to represent. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_next_power_of_two(self) -> Option; } @@ -1053,8 +1053,8 @@ pub trait LossyFrom { /// assert_eq!(lossy, I12F4::from_bits(0x0012)); /// ``` /// -/// [`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html -/// [`Into`]: https://doc.rust-lang.org/nightly/std/convert/trait.Into.html +/// [`From`]: https://doc.rust-lang.org/nightly/core/convert/trait.From.html +/// [`Into`]: https://doc.rust-lang.org/nightly/core/convert/trait.Into.html /// [`LossyFrom`]: trait.LossyFrom.html pub trait LossyInto { /// Performs the conversion. @@ -1111,7 +1111,7 @@ pub trait FromFixed { /// /// Any extra fractional bits are truncated. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_from_fixed(src: F) -> Option where Self: Sized; @@ -1187,7 +1187,7 @@ pub trait ToFixed { /// /// Any extra fractional bits are truncated. /// - /// [`None`]: https://doc.rust-lang.org/nightly/std/option/enum.Option.html#variant.None + /// [`None`]: https://doc.rust-lang.org/nightly/core/option/enum.Option.html#variant.None fn checked_to_fixed(self) -> Option; /// Converts to a fixed-point number, saturating if it does not fit.