Debian Codegraph @

debian/patches/avoid-NEW.patch

raw
1 We want to avoid hitting the NEW queue.
2
3 This means (at least for now):
4
5 - dropping the "rustc-dep-of-std" feature (and its component
6 features, core and compiler_builtins) because this minimal build
7 was not already in debian.
8
9 - dropping the unncessary benchmark dependency on criterion (which
10 itself would require a lot to get through NEW)
11
12 --- a/Cargo.toml
13 +++ b/Cargo.toml
14 @@ -25,21 +25,6 @@
15 [lib]
16 bench = false
17
18 -[[bench]]
19 -name = "bench"
20 -path = "src/bench.rs"
21 -harness = false
22 -[dependencies.compiler_builtins]
23 -version = "0.1.2"
24 -optional = true
25 -
26 -[dependencies.core]
27 -version = "1.0.0"
28 -optional = true
29 -package = "rustc-std-workspace-core"
30 -[dev-dependencies.criterion]
31 -version = "0.3"
32 -
33 [dev-dependencies.getrandom]
34 version = "0.1"
35 features = ["wasm-bindgen"]
36 @@ -52,7 +37,6 @@
37
38 [features]
39 default = ["std"]
40 -rustc-dep-of-std = ["core", "compiler_builtins"]
41 std = []
42 [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen]
43 version = "0.2.63"
44 --- a/src/bench.rs
45 +++ b/src/bench.rs
46 @@ -1,30 +0,0 @@
47 -use adler32::RollingAdler32;
48 -use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
49 -use humansize::{file_size_opts, FileSize};
50 -use rand::Rng;
51 -
52 -fn bench_update_buffer(c: &mut Criterion) {
53 - let mut rng = rand::thread_rng();
54 - let mut group = c.benchmark_group("update_buffer");
55 - for &size in [512, 100 * 1024].iter() {
56 - let mut adler = RollingAdler32::new();
57 - let formatted_size = size.file_size(file_size_opts::BINARY).unwrap();
58 - let in_bytes = {
59 - let mut in_bytes = vec![0u8; size];
60 - rng.fill(&mut in_bytes[..]);
61 - in_bytes
62 - };
63 -
64 - group.throughput(Throughput::Bytes(size as u64));
65 - group.bench_with_input(
66 - BenchmarkId::from_parameter(formatted_size),
67 - &in_bytes,
68 - |b, data| {
69 - b.iter(|| adler.update_buffer(data));
70 - },
71 - );
72 - }
73 -}
74 -
75 -criterion_group!(bench_default, bench_update_buffer);
76 -criterion_main!(bench_default);