diff -Nru rust-approx-0.3.2/Cargo.toml rust-approx-0.5.0/Cargo.toml --- rust-approx-0.3.2/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ rust-approx-0.5.0/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,7 +12,7 @@ [package] name = "approx" -version = "0.3.2" +version = "0.5.0" authors = ["Brendan Zabarauskas "] description = "Approximate floating point equality comparisons and assertions." homepage = "https://github.com/brendanzab/approx" @@ -27,7 +27,7 @@ [lib] name = "approx" [dependencies.num-complex] -version = "0.2.0" +version = "0.4.0" optional = true [dependencies.num-traits] diff -Nru rust-approx-0.3.2/Cargo.toml.orig rust-approx-0.5.0/Cargo.toml.orig --- rust-approx-0.3.2/Cargo.toml.orig 1970-01-01 00:00:00.000000000 +0000 +++ rust-approx-0.5.0/Cargo.toml.orig 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +1,33 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies -# -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) - [package] name = "approx" -version = "0.3.2" +version = "0.5.0" authors = ["Brendan Zabarauskas "] +license = "Apache-2.0" description = "Approximate floating point equality comparisons and assertions." -homepage = "https://github.com/brendanzab/approx" + documentation = "https://docs.rs/approx" -readme = "README.md" -keywords = ["approximate", "assert", "comparison", "equality", "float"] -license = "Apache-2.0" +homepage = "https://github.com/brendanzab/approx" repository = "https://github.com/brendanzab/approx" +readme = "README.md" + +keywords = [ + "approximate", + "assert", + "comparison", + "equality", + "float", +] + [package.metadata.docs.rs] features = ["std", "num-complex"] [lib] name = "approx" -[dependencies.num-complex] -version = "0.2.0" -optional = true - -[dependencies.num-traits] -version = "0.2.0" -default_features = false [features] default = ["std"] std = [] + +[dependencies] +num-traits = { version = "0.2.0", default_features = false } +num-complex = { version = "0.4.0", optional = true } diff -Nru rust-approx-0.3.2/.cargo_vcs_info.json rust-approx-0.5.0/.cargo_vcs_info.json --- rust-approx-0.3.2/.cargo_vcs_info.json 1970-01-01 00:00:00.000000000 +0000 +++ rust-approx-0.5.0/.cargo_vcs_info.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +1,5 @@ { "git": { - "sha1": "82c57f724fe1aa9f303a55086435f9de6983f0ce" + "sha1": "11f6fdac5a32b9367bd8e6cd780ed539e4e9e142" } } diff -Nru rust-approx-0.3.2/debian/cargo-checksum.json rust-approx-0.5.0/debian/cargo-checksum.json --- rust-approx-0.3.2/debian/cargo-checksum.json 2019-07-07 14:31:14.000000000 +0000 +++ rust-approx-0.5.0/debian/cargo-checksum.json 2021-12-20 04:25:25.000000000 +0000 @@ -1 +1 @@ -{"package":"f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3","files":{}} +{"package":"072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e","files":{}} diff -Nru rust-approx-0.3.2/debian/changelog rust-approx-0.5.0/debian/changelog --- rust-approx-0.3.2/debian/changelog 2019-07-07 14:31:14.000000000 +0000 +++ rust-approx-0.5.0/debian/changelog 2021-12-20 04:25:25.000000000 +0000 @@ -1,3 +1,11 @@ +rust-approx (0.5.0-1) unstable; urgency=medium + + * Team upload. + * Package approx 0.5.0 from crates.io using debcargo 2.5.0 + + new upstream version fixes dependency on num-complex. + + -- Peter Michael Green Mon, 20 Dec 2021 04:25:25 +0000 + rust-approx (0.3.2-1) unstable; urgency=medium * Package approx 0.3.2 from crates.io using debcargo 2.2.10 diff -Nru rust-approx-0.3.2/debian/compat rust-approx-0.5.0/debian/compat --- rust-approx-0.3.2/debian/compat 2019-07-07 14:31:14.000000000 +0000 +++ rust-approx-0.5.0/debian/compat 2021-12-20 04:25:25.000000000 +0000 @@ -1 +1 @@ -11 +12 diff -Nru rust-approx-0.3.2/debian/control rust-approx-0.5.0/debian/control --- rust-approx-0.3.2/debian/control 2019-07-07 14:31:14.000000000 +0000 +++ rust-approx-0.5.0/debian/control 2021-12-20 04:25:25.000000000 +0000 @@ -1,8 +1,8 @@ Source: rust-approx Section: rust Priority: optional -Build-Depends: debhelper (>= 11), - dh-cargo (>= 15), +Build-Depends: debhelper (>= 12), + dh-cargo (>= 25), cargo:native , rustc:native , libstd-rust-dev , @@ -10,10 +10,11 @@ Maintainer: Debian Rust Maintainers Uploaders: Sylvestre Ledru -Standards-Version: 4.2.0 +Standards-Version: 4.5.1 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/approx] Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/approx Homepage: https://github.com/brendanzab/approx +Rules-Requires-Root: no Package: librust-approx-dev Architecture: any @@ -29,12 +30,12 @@ librust-approx-0-dev (= ${binary:Version}), librust-approx-0+default-dev (= ${binary:Version}), librust-approx-0+std-dev (= ${binary:Version}), - librust-approx-0.3-dev (= ${binary:Version}), - librust-approx-0.3+default-dev (= ${binary:Version}), - librust-approx-0.3+std-dev (= ${binary:Version}), - librust-approx-0.3.2-dev (= ${binary:Version}), - librust-approx-0.3.2+default-dev (= ${binary:Version}), - librust-approx-0.3.2+std-dev (= ${binary:Version}) + librust-approx-0.5-dev (= ${binary:Version}), + librust-approx-0.5+default-dev (= ${binary:Version}), + librust-approx-0.5+std-dev (= ${binary:Version}), + librust-approx-0.5.0-dev (= ${binary:Version}), + librust-approx-0.5.0+default-dev (= ${binary:Version}), + librust-approx-0.5.0+std-dev (= ${binary:Version}) Description: Approximate floating point equality comparisons and assertions - Rust source code This package contains the source for the Rust approx crate, packaged by debcargo for use with cargo and dh-cargo. @@ -45,11 +46,11 @@ Depends: ${misc:Depends}, librust-approx-dev (= ${binary:Version}), - librust-num-complex-0.2+default-dev + librust-num-complex-0.4+default-dev Provides: librust-approx-0+num-complex-dev (= ${binary:Version}), - librust-approx-0.3+num-complex-dev (= ${binary:Version}), - librust-approx-0.3.2+num-complex-dev (= ${binary:Version}) + librust-approx-0.5+num-complex-dev (= ${binary:Version}), + librust-approx-0.5.0+num-complex-dev (= ${binary:Version}) Description: Approximate floating point equality comparisons and assertions - feature "num-complex" - This metapackage enables feature num-complex for the Rust approx crate, by + This metapackage enables feature "num-complex" for the Rust approx crate, by pulling in any additional dependencies needed by that feature. diff -Nru rust-approx-0.3.2/debian/copyright.debcargo.hint rust-approx-0.5.0/debian/copyright.debcargo.hint --- rust-approx-0.3.2/debian/copyright.debcargo.hint 2019-07-07 14:31:14.000000000 +0000 +++ rust-approx-0.5.0/debian/copyright.debcargo.hint 2021-12-20 04:25:25.000000000 +0000 @@ -56,8 +56,8 @@ Files: debian/* Copyright: - 2019 Debian Rust Maintainers - 2019 Sylvestre Ledru + 2019-2021 Debian Rust Maintainers + 2019-2021 Sylvestre Ledru License: Apache-2.0 License: Apache-2.0 diff -Nru rust-approx-0.3.2/debian/librust-approx+num-complex-dev.lintian-overrides rust-approx-0.5.0/debian/librust-approx+num-complex-dev.lintian-overrides --- rust-approx-0.3.2/debian/librust-approx+num-complex-dev.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ rust-approx-0.5.0/debian/librust-approx+num-complex-dev.lintian-overrides 2021-12-20 04:25:25.000000000 +0000 @@ -0,0 +1 @@ +librust-approx+num-complex-dev binary: empty-rust-library-declares-provides * \ No newline at end of file diff -Nru rust-approx-0.3.2/debian/rules rust-approx-0.5.0/debian/rules --- rust-approx-0.3.2/debian/rules 2019-07-07 14:31:14.000000000 +0000 +++ rust-approx-0.5.0/debian/rules 2021-12-20 04:25:25.000000000 +0000 @@ -1,3 +1,6 @@ #!/usr/bin/make -f %: dh $@ --buildsystem cargo + +override_dh_auto_test: + dh_auto_test -- test --all diff -Nru rust-approx-0.3.2/debian/tests/control rust-approx-0.5.0/debian/tests/control --- rust-approx-0.3.2/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ rust-approx-0.5.0/debian/tests/control 2021-12-20 04:25:25.000000000 +0000 @@ -0,0 +1,24 @@ +Test-Command: /usr/share/cargo/bin/cargo-auto-test approx 0.5.0 --all-targets --all-features +Features: test-name=rust-approx:@ +Depends: dh-cargo (>= 18), @ +Restrictions: allow-stderr, skip-not-installable + +Test-Command: /usr/share/cargo/bin/cargo-auto-test approx 0.5.0 --all-targets +Features: test-name=librust-approx-dev:default +Depends: dh-cargo (>= 18), @ +Restrictions: allow-stderr, skip-not-installable + +Test-Command: /usr/share/cargo/bin/cargo-auto-test approx 0.5.0 --all-targets --no-default-features --features std +Features: test-name=librust-approx-dev:std +Depends: dh-cargo (>= 18), @ +Restrictions: allow-stderr, skip-not-installable + +Test-Command: /usr/share/cargo/bin/cargo-auto-test approx 0.5.0 --all-targets --no-default-features +Features: test-name=librust-approx-dev: +Depends: dh-cargo (>= 18), @ +Restrictions: allow-stderr, skip-not-installable + +Test-Command: /usr/share/cargo/bin/cargo-auto-test approx 0.5.0 --all-targets --no-default-features --features num-complex +Features: test-name=librust-approx+num-complex-dev:num-complex +Depends: dh-cargo (>= 18), @ +Restrictions: allow-stderr, skip-not-installable diff -Nru rust-approx-0.3.2/debian/watch rust-approx-0.5.0/debian/watch --- rust-approx-0.3.2/debian/watch 2019-07-07 14:31:14.000000000 +0000 +++ rust-approx-0.5.0/debian/watch 2021-12-20 04:25:25.000000000 +0000 @@ -2,4 +2,3 @@ opts=filenamemangle=s/.*\/(.*)\/download/approx-$1\.tar\.gz/g,\ uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/approx .*/crates/approx/@ANY_VERSION@/download - diff -Nru rust-approx-0.3.2/.github/dependabot.yml rust-approx-0.5.0/.github/dependabot.yml --- rust-approx-0.3.2/.github/dependabot.yml 1970-01-01 00:00:00.000000000 +0000 +++ rust-approx-0.5.0/.github/dependabot.yml 1970-01-01 00:00:00.000000000 +0000 @@ -0,0 +1,8 @@ +version: 2 +updates: +- package-ecosystem: cargo + directory: "/" + schedule: + interval: daily + time: "19:00" + open-pull-requests-limit: 10 diff -Nru rust-approx-0.3.2/src/abs_diff_eq.rs rust-approx-0.5.0/src/abs_diff_eq.rs --- rust-approx-0.3.2/src/abs_diff_eq.rs 2019-03-17 05:50:36.000000000 +0000 +++ rust-approx-0.5.0/src/abs_diff_eq.rs 1970-01-01 00:00:00.000000000 +0000 @@ -14,15 +14,15 @@ /// The default tolerance to use when testing values that are close together. /// - /// This is used when no `epsilon` value is supplied to the `abs_diff_eq!`, `relative_eq!`, or - /// `ulps_eq!` macros. + /// This is used when no `epsilon` value is supplied to the [`abs_diff_eq!`], [`relative_eq!`], + /// or [`ulps_eq!`] macros. fn default_epsilon() -> Self::Epsilon; /// A test for equality that uses the absolute difference to compute the approximate /// equality of two numbers. fn abs_diff_eq(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool; - /// The inverse of `ApproxEq::abs_diff_eq`. + /// The inverse of [`AbsDiffEq::abs_diff_eq`]. fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool { !Self::abs_diff_eq(self, other, epsilon) } diff -Nru rust-approx-0.3.2/src/lib.rs rust-approx-0.5.0/src/lib.rs --- rust-approx-0.3.2/src/lib.rs 2019-03-17 05:50:36.000000000 +0000 +++ rust-approx-0.5.0/src/lib.rs 1970-01-01 00:00:00.000000000 +0000 @@ -16,8 +16,8 @@ //! based types, using either relative difference, or units in the last place (ULPs) //! comparisons. //! -//! You can also use the `approx_{eq, ne}!` `assert_approx_{eq, ne}!` macros to test for equality -//! using a more positional style. +//! You can also use the `*_{eq, ne}!` and `assert_*_{eq, ne}!` macros to test for equality using a +//! more positional style: //! //! ```rust //! #[macro_use] @@ -45,7 +45,7 @@ //! //! # Implementing approximate equality for custom types //! -//! The `ApproxEq` trait allows approximate equalities to be implemented on types, based on the +//! The `*Eq` traits allow approximate equalities to be implemented on types, based on the //! fundamental floating point implementations. //! //! For example, we might want to be able to do approximate assertions on a complex number type: @@ -92,9 +92,9 @@ //! # } //! ``` //! -//! To do this we can implement `AbsDiffEq`, `RelativeEq` and `UlpsEq` generically in terms of a -//! type parameter that also implements `ApproxEq`, `RelativeEq` and `UlpsEq` respectively. This -//! means that we can make comparisons for either `Complex` or `Complex`: +//! To do this we can implement [`AbsDiffEq`], [`RelativeEq`] and [`UlpsEq`] generically in terms +//! of a type parameter that also implements `AbsDiffEq`, `RelativeEq` and `UlpsEq` respectively. +//! This means that we can make comparisons for either `Complex` or `Complex`: //! //! ```rust //! # use approx::{AbsDiffEq, RelativeEq, UlpsEq}; @@ -148,11 +148,11 @@ //! Floating point is hard! Thanks goes to these links for helping to make things a _little_ //! easier to understand: //! -//! - [Comparing Floating Point Numbers, 2012 Edition] -//! (https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/) +//! - [Comparing Floating Point Numbers, 2012 Edition]( +//! https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/) //! - [The Floating Point Guide - Comparison](http://floating-point-gui.de/errors/comparison/) -//! - [What Every Computer Scientist Should Know About Floating-Point Arithmetic] -//! (https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html) +//! - [What Every Computer Scientist Should Know About Floating-Point Arithmetic]( +//! https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html) #![cfg_attr(not(feature = "std"), no_std)] @@ -223,12 +223,14 @@ /// Peform the equality comparison #[inline] + #[must_use] pub fn eq(self, lhs: &A, rhs: &B) -> bool { A::abs_diff_eq(lhs, rhs, self.epsilon) } /// Peform the inequality comparison #[inline] + #[must_use] pub fn ne(self, lhs: &A, rhs: &B) -> bool { A::abs_diff_ne(lhs, rhs, self.epsilon) } @@ -299,12 +301,14 @@ /// Peform the equality comparison #[inline] + #[must_use] pub fn eq(self, lhs: &A, rhs: &B) -> bool { A::relative_eq(lhs, rhs, self.epsilon, self.max_relative) } /// Peform the inequality comparison #[inline] + #[must_use] pub fn ne(self, lhs: &A, rhs: &B) -> bool { A::relative_ne(lhs, rhs, self.epsilon, self.max_relative) } @@ -372,12 +376,14 @@ /// Peform the equality comparison #[inline] + #[must_use] pub fn eq(self, lhs: &A, rhs: &B) -> bool { A::ulps_eq(lhs, rhs, self.epsilon, self.max_ulps) } /// Peform the inequality comparison #[inline] + #[must_use] pub fn ne(self, lhs: &A, rhs: &B) -> bool { A::ulps_ne(lhs, rhs, self.epsilon, self.max_ulps) } diff -Nru rust-approx-0.3.2/src/macros.rs rust-approx-0.5.0/src/macros.rs --- rust-approx-0.3.2/src/macros.rs 2019-03-17 05:50:36.000000000 +0000 +++ rust-approx-0.5.0/src/macros.rs 1970-01-01 00:00:00.000000000 +0000 @@ -120,7 +120,7 @@ }}; } -/// An assertion that delegates to `abs_diff_eq!`, and panics with a helpful error on failure. +/// An assertion that delegates to [`abs_diff_eq!`], and panics with a helpful error on failure. #[macro_export(local_inner_macros)] macro_rules! assert_abs_diff_eq { ($given:expr, $expected:expr $(, $opt:ident = $val:expr)*) => { @@ -131,7 +131,7 @@ }; } -/// An assertion that delegates to `abs_diff_ne!`, and panics with a helpful error on failure. +/// An assertion that delegates to [`abs_diff_ne!`], and panics with a helpful error on failure. #[macro_export(local_inner_macros)] macro_rules! assert_abs_diff_ne { ($given:expr, $expected:expr $(, $opt:ident = $val:expr)*) => { @@ -142,7 +142,7 @@ }; } -/// An assertion that delegates to `relative_eq!`, and panics with a helpful error on failure. +/// An assertion that delegates to [`relative_eq!`], and panics with a helpful error on failure. #[macro_export(local_inner_macros)] macro_rules! assert_relative_eq { ($given:expr, $expected:expr $(, $opt:ident = $val:expr)*) => { @@ -153,7 +153,7 @@ }; } -/// An assertion that delegates to `relative_ne!`, and panics with a helpful error on failure. +/// An assertion that delegates to [`relative_ne!`], and panics with a helpful error on failure. #[macro_export(local_inner_macros)] macro_rules! assert_relative_ne { ($given:expr, $expected:expr $(, $opt:ident = $val:expr)*) => { @@ -164,7 +164,7 @@ }; } -/// An assertion that delegates to `ulps_eq!`, and panics with a helpful error on failure. +/// An assertion that delegates to [`ulps_eq!`], and panics with a helpful error on failure. #[macro_export(local_inner_macros)] macro_rules! assert_ulps_eq { ($given:expr, $expected:expr $(, $opt:ident = $val:expr)*) => { @@ -175,7 +175,7 @@ }; } -/// An assertion that delegates to `ulps_ne!`, and panics with a helpful error on failure. +/// An assertion that delegates to [`ulps_ne!`], and panics with a helpful error on failure. #[macro_export(local_inner_macros)] macro_rules! assert_ulps_ne { ($given:expr, $expected:expr $(, $opt:ident = $val:expr)*) => { diff -Nru rust-approx-0.3.2/src/relative_eq.rs rust-approx-0.5.0/src/relative_eq.rs --- rust-approx-0.3.2/src/relative_eq.rs 2019-03-17 05:50:36.000000000 +0000 +++ rust-approx-0.5.0/src/relative_eq.rs 1970-01-01 00:00:00.000000000 +0000 @@ -14,7 +14,7 @@ { /// The default relative tolerance for testing values that are far-apart. /// - /// This is used when no `max_relative` value is supplied to the `relative_eq` macro. + /// This is used when no `max_relative` value is supplied to the [`relative_eq`] macro. fn default_max_relative() -> Self::Epsilon; /// A test for equality that uses a relative comparison if the values are far apart. @@ -25,7 +25,7 @@ max_relative: Self::Epsilon, ) -> bool; - /// The inverse of `ApproxEq::relative_eq`. + /// The inverse of [`RelativeEq::relative_eq`]. fn relative_ne( &self, other: &Rhs, diff -Nru rust-approx-0.3.2/src/ulps_eq.rs rust-approx-0.5.0/src/ulps_eq.rs --- rust-approx-0.3.2/src/ulps_eq.rs 2019-03-17 05:50:36.000000000 +0000 +++ rust-approx-0.5.0/src/ulps_eq.rs 1970-01-01 00:00:00.000000000 +0000 @@ -14,13 +14,13 @@ { /// The default ULPs to tolerate when testing values that are far-apart. /// - /// This is used when no `max_ulps` value is supplied to the `ulps_eq` macro. + /// This is used when no `max_ulps` value is supplied to the [`ulps_eq`] macro. fn default_max_ulps() -> u32; /// A test for equality that uses units in the last place (ULP) if the values are far apart. fn ulps_eq(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool; - /// The inverse of `ApproxEq::ulps_eq`. + /// The inverse of [`UlpsEq::ulps_eq`]. fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool { !Self::ulps_eq(self, other, epsilon, max_ulps) } diff -Nru rust-approx-0.3.2/.travis.yml rust-approx-0.5.0/.travis.yml --- rust-approx-0.3.2/.travis.yml 2019-03-17 05:50:36.000000000 +0000 +++ rust-approx-0.5.0/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +1,7 @@ language: rust rust: - - 1.20.0 + - 1.31.0 - nightly - beta - stable @@ -18,7 +18,7 @@ - rust: nightly before_script: - - if [ "$TRAVIS_RUST_VERSION" == "1.20.0" ]; then rm -f tests/macro_import.rs; fi + - if [ "$TRAVIS_RUST_VERSION" == "1.31.0" ]; then rm -f tests/macro_import.rs; fi - cargo build --verbose script: