Skip to content

Commit 50de029

Browse files
committed
Fix various minor warnings
1 parent 2b1ae87 commit 50de029

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/cbor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub use coset::cbor::Value;
1414
use indexmap::{Equivalent, IndexMap};
1515
use serde::{Deserialize, Serialize};
1616
use serde_with::SerializeAs;
17-
use thiserror::Error;
1817

1918
use crate::error::{Error, Result};
2019

src/record/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl TryFrom<&Integer> for RecordMetadataId {
7474

7575
fn try_from(value: &Integer) -> std::result::Result<Self, ()> {
7676
// 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(|_| ())?;
7878
Ok(match value {
7979
_ if value == Self::CreatedAt as u64 => Self::CreatedAt,
8080
_ => return Err(()),

src/record/segment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ impl Segment {
538538
length: plaintext.len() as u64,
539539
max_length: encryption.padding_to_bytes,
540540
})?;
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));
542542
plaintext
543543
};
544544
let encryption_key = fragment_key

src/registry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use tokio::{
3535
io::{AsyncRead, AsyncWrite},
3636
};
3737
use tokio_util::io::SyncIoBridge;
38-
use tracing::{info, instrument, warn};
38+
use tracing::instrument;
3939

4040
pub const BYTES_HASH_PEPPER_RECOMMENDED: usize = 32;
4141

@@ -93,7 +93,7 @@ where
9393
}
9494

9595
if value < P::RECOMMENDED {
96-
warn!(
96+
tracing::warn!(
9797
"parameter {label:?} is set to the value {value:?} lower than the recommended value of {recommended:?}",
9898
label = P::LABEL,
9999
value = value,

0 commit comments

Comments
 (0)