File tree 3 files changed +16
-8
lines changed
3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -24,32 +24,30 @@ log = "0.4"
24
24
thiserror = " 1.0"
25
25
26
26
[dependencies .ring ]
27
- version = " 0.16 "
27
+ version = " 0.17 "
28
28
optional = true
29
29
30
30
[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 }
32
32
33
33
[dependencies .openssl ]
34
34
version = " 0.10"
35
35
features = [" vendored" ]
36
36
optional = true
37
37
38
38
[dev-dependencies ]
39
- criterion = { version = " 0.4 " , features = [" html_reports" ] }
39
+ criterion = { version = " 0.5 " , features = [" html_reports" ] }
40
40
hex = " 0.4"
41
41
lazy_static = " 1.4.0"
42
42
phf = { version = " 0.11" , features = [" macros" ] }
43
43
pretty_assertions = " 1.3"
44
44
rand = " 0.8"
45
45
serde = { version = " 1.0" , features = [" derive" ] }
46
46
serde_json = " 1.0"
47
- strum_macros = " 0.24 "
47
+ strum_macros = " 0.25 "
48
48
49
49
[features ]
50
50
default = [" ring" ]
51
- openssl = [" dep:openssl" ]
52
- ring = [" dep:ring" ]
53
51
54
52
[[bench ]]
55
53
name = " bench_main"
Original file line number Diff line number Diff line change @@ -5,9 +5,13 @@ use sframe::{
5
5
header:: Header ,
6
6
header:: { Deserialization , Serialization } ,
7
7
} ;
8
+ use std:: fmt:: Write ;
8
9
9
10
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
+ } )
11
15
}
12
16
13
17
fn main ( ) {
Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2023 GoTo Group, Inc
2
2
// SPDX-License-Identifier: Apache-2.0 AND MIT
3
3
4
+ #[ cfg( test) ]
5
+ use std:: fmt:: Write ;
6
+
4
7
#[ cfg( test) ]
5
8
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
+ } )
7
13
}
8
14
9
15
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments