Skip to content

Commit bd1b514

Browse files
committed
Fix clippy warning
1 parent a67bfbc commit bd1b514

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

concordium-node/src/bin/bootstrap_checker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn main() -> anyhow::Result<()> {
3737
let regenesis_arc: Arc<Regenesis> = Arc::new(Regenesis::from_blocks(regenesis_blocks));
3838

3939
ensure!(
40-
regenesis_arc.blocks.read().unwrap().len() > 0,
40+
!regenesis_arc.blocks.read().unwrap().is_empty(),
4141
"Bootstrapper can't run without specifying genesis hashes."
4242
);
4343

concordium-node/src/bin/bootstrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async fn main() -> anyhow::Result<()> {
4040
let regenesis_arc: Arc<Regenesis> = Arc::new(Regenesis::from_blocks(regenesis_blocks));
4141

4242
ensure!(
43-
regenesis_arc.blocks.read().unwrap().len() > 0,
43+
!regenesis_arc.blocks.read().unwrap().is_empty(),
4444
"Bootstrapper can't run without specifying genesis hashes."
4545
);
4646

concordium-node/src/consensus_ffi/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2383,7 +2383,7 @@ impl ConsensusContainer {
23832383
use crate::grpc2::Require;
23842384
let bhi = crate::grpc2::types::block_hash_input_to_ffi(block_hash).require()?;
23852385
let (block_id_type, block_hash) = bhi.to_ptr();
2386-
let token_id_len = token_id.value.as_bytes().len();
2386+
let token_id_len = token_id.value.len();
23872387
if token_id_len > 255 {
23882388
return Err(tonic::Status::invalid_argument(
23892389
"TokenId: length must be at most 255 bytes",

concordium-node/src/health.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ enum ServiceError<'a> {
5151
ServiceNotFound { service: &'a str },
5252
}
5353

54-
impl<'a> ServiceError<'a> {
54+
impl ServiceError<'_> {
5555
pub fn is_not_found(&self) -> bool {
5656
matches!(self, Self::ServiceNotFound { .. })
5757
}

0 commit comments

Comments
 (0)