]> git.proxmox.com Git - debcargo-conf.git/commitdiff
patch bench.rs so it can be built without the std feature.
authorPeter Michael Green <plugwash@debian.org>
Wed, 22 Dec 2021 13:39:53 +0000 (13:39 +0000)
committerPeter Michael Green <plugwash@debian.org>
Wed, 22 Dec 2021 16:12:05 +0000 (16:12 +0000)
src/itoa/debian/changelog
src/itoa/debian/patches/fix-bench-without-std-feature.patch [new file with mode: 0644]
src/itoa/debian/patches/series [new file with mode: 0644]

index 712934ad8087e03a630676353a53332b39be0ecb..fffbf9a395e05318510e2cc93efc04c5c9d0ba9e 100644 (file)
@@ -5,6 +5,7 @@ rust-itoa (0.4.8-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
   * Update copyright years
   * Remove udiv128 from debian/copyright, the file was rewritten upstream
     and no longer has a license header.
+  * Patch bench.rs so it can be built without the "std" feature.
 
  -- Peter Michael Green <plugwash@debian.org>  Wed, 22 Dec 2021 13:21:06 +0000
 
diff --git a/src/itoa/debian/patches/fix-bench-without-std-feature.patch b/src/itoa/debian/patches/fix-bench-without-std-feature.patch
new file mode 100644 (file)
index 0000000..24f5e47
--- /dev/null
@@ -0,0 +1,13 @@
+Index: itoa/benches/bench.rs
+===================================================================
+--- itoa.orig/benches/bench.rs
++++ itoa/benches/bench.rs
+@@ -12,7 +12,7 @@ macro_rules! benches {
+             $name:ident($value:expr)
+         ),*
+     ) => {
+-        mod bench_itoa_write {
++        #[cfg(feature = "std")]mod bench_itoa_write {
+             use test::{Bencher, black_box};
+             $(
+                 $(#[$attr])*
diff --git a/src/itoa/debian/patches/series b/src/itoa/debian/patches/series
new file mode 100644 (file)
index 0000000..5e67c5e
--- /dev/null
@@ -0,0 +1 @@
+fix-bench-without-std-feature.patch