Skip to content

Commit f525cb4

Browse files
authored
Merge pull request #35 from goto-opensource/chore/update-deps
Chore/update deps
2 parents b20a660 + a033440 commit f525cb4

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

Cargo.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,30 @@ log = "0.4"
2424
thiserror = "1.0"
2525

2626
[dependencies.ring]
27-
version = "0.16"
27+
version = "0.17"
2828
optional = true
2929

3030
[target.'cfg(target_arch = "wasm32")'.dependencies]
31-
ring = { version = "0.16", features = ["wasm32_c"], optional = true }
31+
ring = { version = "0.17", features = ["wasm32_unknown_unknown_js"], optional = true }
3232

3333
[dependencies.openssl]
3434
version = "0.10"
3535
features = ["vendored"]
3636
optional = true
3737

3838
[dev-dependencies]
39-
criterion = { version = "0.4", features = ["html_reports"] }
39+
criterion = { version = "0.5", features = ["html_reports"] }
4040
hex = "0.4"
4141
lazy_static = "1.4.0"
4242
phf = { version = "0.11", features = ["macros"] }
4343
pretty_assertions = "1.3"
4444
rand = "0.8"
4545
serde = { version = "1.0", features = ["derive"] }
4646
serde_json = "1.0"
47-
strum_macros = "0.24"
47+
strum_macros = "0.25"
4848

4949
[features]
5050
default = ["ring"]
51-
openssl = ["dep:openssl"]
52-
ring = ["dep:ring"]
5351

5452
[[bench]]
5553
name = "bench_main"

examples/generate_headers.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ use sframe::{
55
header::Header,
66
header::{Deserialization, Serialization},
77
};
8+
use std::fmt::Write;
89

910
fn bin2string(bin: &[u8]) -> String {
10-
bin.iter().map(|x| format!("{x:08b} ")).collect()
11+
bin.iter().fold(String::new(), |mut output, x| {
12+
let _ = write!(output, "{x:08b} ");
13+
output
14+
})
1115
}
1216

1317
fn main() {

src/util.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
// Copyright (c) 2023 GoTo Group, Inc
22
// SPDX-License-Identifier: Apache-2.0 AND MIT
33

4+
#[cfg(test)]
5+
use std::fmt::Write;
6+
47
#[cfg(test)]
58
pub(crate) fn bin2string(bin: &[u8]) -> String {
6-
bin.iter().map(|x| format!("{x:08b} ")).collect()
9+
bin.iter().fold(String::new(), |mut output, x| {
10+
let _ = write!(output, "{x:08b} ");
11+
output
12+
})
713
}
814

915
#[cfg(test)]

0 commit comments

Comments
 (0)