File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ pub use coset::cbor::Value;
14
14
use indexmap:: { Equivalent , IndexMap } ;
15
15
use serde:: { Deserialize , Serialize } ;
16
16
use serde_with:: SerializeAs ;
17
- use thiserror:: Error ;
18
17
19
18
use crate :: error:: { Error , Result } ;
20
19
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ impl TryFrom<&Integer> for RecordMetadataId {
74
74
75
75
fn try_from ( value : & Integer ) -> std:: result:: Result < Self , ( ) > {
76
76
// Consider using the `num_enum` crate if this becomes cumbersome.
77
- let value: u64 = value . clone ( ) . try_into ( ) . map_err ( |_| ( ) ) ?;
77
+ let value: u64 = ( * value ) . try_into ( ) . map_err ( |_| ( ) ) ?;
78
78
Ok ( match value {
79
79
_ if value == Self :: CreatedAt as u64 => Self :: CreatedAt ,
80
80
_ => return Err ( ( ) ) ,
Original file line number Diff line number Diff line change @@ -538,7 +538,7 @@ impl Segment {
538
538
length : plaintext. len ( ) as u64 ,
539
539
max_length : encryption. padding_to_bytes ,
540
540
} ) ?;
541
- plaintext. extend ( std:: iter:: repeat ( 0_u8 ) . take ( padding_length as usize ) ) ;
541
+ plaintext. extend ( std:: iter:: repeat_n ( 0_u8 , padding_length as usize ) ) ;
542
542
plaintext
543
543
} ;
544
544
let encryption_key = fragment_key
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ use tokio::{
35
35
io:: { AsyncRead , AsyncWrite } ,
36
36
} ;
37
37
use tokio_util:: io:: SyncIoBridge ;
38
- use tracing:: { info , instrument, warn } ;
38
+ use tracing:: instrument;
39
39
40
40
pub const BYTES_HASH_PEPPER_RECOMMENDED : usize = 32 ;
41
41
93
93
}
94
94
95
95
if value < P :: RECOMMENDED {
96
- warn ! (
96
+ tracing :: warn!(
97
97
"parameter {label:?} is set to the value {value:?} lower than the recommended value of {recommended:?}" ,
98
98
label = P :: LABEL ,
99
99
value = value,
You can’t perform that action at this time.
0 commit comments