update to version 0.3.1

epel9
Fabio Valentini 4 years ago
parent 6ce208e9f2
commit caf0e7c9f5
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -1 +1,2 @@
/float-ord-0.2.0.crate /float-ord-0.2.0.crate
/float-ord-0.3.1.crate

@ -1,51 +0,0 @@
diff -ru float-ord-0.2.0/Cargo.toml float-ord-0.2.0.patched/Cargo.toml
--- float-ord-0.2.0/Cargo.toml 1969-12-31 19:00:00.000000000 -0500
+++ float-ord-0.2.0.patched/Cargo.toml 2020-01-28 16:36:06.742269458 -0500
@@ -20,6 +20,6 @@
license = "MIT / Apache-2.0"
repository = "https://github.com/notriddle/rust-float-ord"
[dev-dependencies.rand]
-version = "0.3"
+version = "0.7"
[badges.travis-ci]
repository = "notriddle/rust-float-ord"
diff -ru float-ord-0.2.0/src/lib.rs float-ord-0.2.0.patched/src/lib.rs
--- float-ord-0.2.0/src/lib.rs 2018-01-30 14:28:28.000000000 -0500
+++ float-ord-0.2.0.patched/src/lib.rs 2020-01-28 17:08:50.441756013 -0500
@@ -78,6 +78,7 @@
extern crate rand;
use self::rand::{Rng, thread_rng};
+ use self::std::iter;
use self::std::prelude::v1::*;
use self::std::collections::hash_map::DefaultHasher;
use self::std::hash::{Hash, Hasher};
@@ -108,8 +109,8 @@
let mut rng = thread_rng();
for n in 0..16 {
for l in 0..16 {
- let v = rng.gen_iter::<f64>()
- .map(|x| x % (1 << l) as i64 as f64)
+ let v = iter::repeat(()).map(|()| rng.gen())
+ .map(|x: f64| x % (1 << l) as i64 as f64)
.take((1 << n))
.collect::<Vec<_>>();
assert!(v.windows(2).all(|w| (w[0] <= w[1]) == (FloatOrd(w[0]) <= FloatOrd(w[1]))));
@@ -140,14 +141,14 @@
let mut rng = thread_rng();
for n in 0..16 {
for l in 0..16 {
- let mut v = rng.gen_iter::<f64>()
- .map(|x| x % (1 << l) as i64 as f64)
+ let mut v = iter::repeat(()).map(|()| rng.gen())
+ .map(|x: f64| x % (1 << l) as i64 as f64)
.take((1 << n))
.collect::<Vec<_>>();
let mut v1 = v.clone();
super::sort(&mut v);
- assert!(v.windows(2).all(|w| w[0] <= w[1]));
+ assert!(v.windows(2).all(|w: &[f64]| w[0] <= w[1]));
v1.sort_by(|a, b| a.partial_cmp(b).unwrap());
assert!(v1.windows(2).all(|w| w[0] <= w[1]));

@ -1,20 +1,18 @@
# Generated by rust2rpm 13 # Generated by rust2rpm 17
%bcond_without check %bcond_without check
%global debug_package %{nil} %global debug_package %{nil}
%global crate float-ord %global crate float-ord
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.2.0 Version: 0.3.1
Release: 3%{?dist} Release: 1%{?dist}
Summary: Total ordering for floating-point numbers Summary: Total ordering for floating-point numbers
# Upstream license specification: MIT / Apache-2.0 # Upstream license specification: MIT / Apache-2.0
License: MIT or ASL 2.0 License: MIT or ASL 2.0
URL: https://crates.io/crates/float-ord URL: https://crates.io/crates/float-ord
Source: %{crates_source} Source: %{crates_source}
# https://github.com/notriddle/rust-float-ord/pull/7
Patch0: 0000-Update-to-rand-0.7.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build} %if %{__cargo_skip_build}
@ -75,6 +73,10 @@ dos2unix README.md
%endif %endif
%changelog %changelog
* Thu Jun 17 2021 Fabio Valentini <decathorpe@gmail.com> - 0.3.1-1
- Update to version 0.3.1.
- Fixes RHBZ#1945479
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-3 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

@ -1 +1 @@
SHA512 (float-ord-0.2.0.crate) = 10049cd4331b0330267a1f0959e453077f94d4b99c4c4450f0967618ccdc8514a45ef75a243f57aa225a1ac125cee4d03e1e3416a8928ccff977af7fe7927093 SHA512 (float-ord-0.3.1.crate) = ca639f6e492b95125f6bd0f4f09eeee9bd8c7b2f5036a88384ffd361b812c3d6df8693de5bcc04ffa8a84ab65e44db5ed526448285ba9c67446b348c0167ab2d

Loading…
Cancel
Save