diff --git a/databroker-cli/src/kuksa_cli.rs b/databroker-cli/src/kuksa_cli.rs index 5dd91099..1b86f054 100644 --- a/databroker-cli/src/kuksa_cli.rs +++ b/databroker-cli/src/kuksa_cli.rs @@ -312,7 +312,7 @@ pub async fn kuksa_main(_cli: Cli) -> Result<(), Box> { } } Err(err) => { - cli::print_error(cmd, &format!("Malformed token: {err}"))? + cli::print_error(cmd, format!("Malformed token: {err}"))? } } } @@ -350,12 +350,12 @@ pub async fn kuksa_main(_cli: Cli) -> Result<(), Box> { } } Err(err) => { - cli::print_error(cmd, &format!("Malformed token: {err}"))? + cli::print_error(cmd, format!("Malformed token: {err}"))? } }, Err(err) => cli::print_error( cmd, - &format!( + format!( "Failed to open token file \"{token_filename}\": {err}" ), )?, diff --git a/databroker-cli/src/sdv_cli.rs b/databroker-cli/src/sdv_cli.rs index e1913e29..0bf91b0d 100644 --- a/databroker-cli/src/sdv_cli.rs +++ b/databroker-cli/src/sdv_cli.rs @@ -256,7 +256,7 @@ pub async fn sdv_main(_cli: Cli) -> Result<(), Box> { } } Err(err) => { - cli::print_error(cmd, &format!("Malformed token: {err}"))? + cli::print_error(cmd, format!("Malformed token: {err}"))? } } } @@ -295,12 +295,12 @@ pub async fn sdv_main(_cli: Cli) -> Result<(), Box> { } } Err(err) => { - cli::print_error(cmd, &format!("Malformed token: {err}"))? + cli::print_error(cmd, format!("Malformed token: {err}"))? } }, Err(err) => cli::print_error( cmd, - &format!( + format!( "Failed to open token file \"{token_filename}\": {err}" ), )?, diff --git a/databroker/src/grpc/kuksa_val_v2/val.rs b/databroker/src/grpc/kuksa_val_v2/val.rs index 6bf008b8..5a635cde 100644 --- a/databroker/src/grpc/kuksa_val_v2/val.rs +++ b/databroker/src/grpc/kuksa_val_v2/val.rs @@ -786,7 +786,7 @@ mod tests { )]) .await; - return entry_id; + entry_id } #[tokio::test] @@ -830,8 +830,7 @@ mod tests { ); } Err(status) => { - // Handle the error from the publish_value function - assert!(false, "Get failed with status: {:?}", status); + panic!("Get failed with status: {:?}", status); } } } @@ -879,8 +878,7 @@ mod tests { ); } Err(status) => { - // Handle the error from the publish_value function - assert!(false, "Get failed with status: {:?}", status); + panic!("Get failed with status: {:?}", status); } } } @@ -904,7 +902,7 @@ mod tests { match broker.get_value(get_value_request).await { Ok(_response) => { - assert!(false, "Did not expect success"); + panic!("Did not expect success"); } Err(status) => { assert_eq!(status.code(), tonic::Code::Unauthenticated) @@ -966,7 +964,7 @@ mod tests { } Err(status) => { // Handle the error from the publish_value function - assert!(false, "Get failed with status: {:?}", status); + panic!("Get failed with status: {:?}", status); } } } @@ -993,7 +991,7 @@ mod tests { match broker.get_value(get_value_request).await { Ok(_response) => { - assert!(false, "Did not expect success"); + panic!("Did not expect success"); } Err(status) => { assert_eq!(status.code(), tonic::Code::NotFound) @@ -1023,7 +1021,7 @@ mod tests { match broker.get_value(get_value_request).await { Ok(_response) => { - assert!(false, "Did not expect success"); + panic!("Did not expect success"); } Err(status) => { assert_eq!(status.code(), tonic::Code::NotFound)