Skip to content

removed unwrap

removed unwrap #243

Triggered via push December 7, 2023 10:48
Status Failure
Total duration 45s
Artifacts

check_format.yml

on: push
cargo fmt
17s
cargo fmt
Clippy lint and check
37s
Clippy lint and check
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 10 warnings
`to_string` applied to a type that implements `Display` in `format!` args: src/api/ecdar_api.rs#L266
error: `to_string` applied to a type that implements `Display` in `format!` args --> src/api/ecdar_api.rs:266:24 | 266 | err.to_string() | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `-D clippy::to-string-in-format-args` implied by `-D clippy::perf` = help: to override `-D clippy::perf` add `#[allow(clippy::to_string_in_format_args)]`
`to_string` applied to a type that implements `Display` in `format!` args: src/api/ecdar_api.rs#L266
error: `to_string` applied to a type that implements `Display` in `format!` args --> src/api/ecdar_api.rs:266:24 | 266 | err.to_string() | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `-D clippy::to-string-in-format-args` implied by `-D clippy::perf` = help: to override `-D clippy::perf` add `#[allow(clippy::to_string_in_format_args)]`
Clippy lint and check
Clippy has exited with exit code 101
used `unwrap()` on a `Result` value: src/build.rs#L2
warning: used `unwrap()` on a `Result` value --> src/build.rs:2:5 | 2 | / tonic_build::configure() 3 | | .type_attribute( 4 | | "ComponentsInfo", 5 | | "#[derive(serde::Serialize, serde::Deserialize)]", ... | 13 | | .compile(&["Ecdar-ProtoBuf/services.proto"], &["Ecdar-ProtoBuf/"]) 14 | | .unwrap(); | |_________________^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used = note: requested on the command line with `-W clippy::unwrap-used`
redundant field names in struct initialization: src/api/ecdar_api.rs#L258
warning: redundant field names in struct initialization --> src/api/ecdar_api.rs:258:21 | 258 | result: result, | ^^^^^^^^^^^^^^ help: replace it with: `result` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `#[warn(clippy::redundant_field_names)]` on by default
redundant field names in struct initialization: src/api/ecdar_api.rs#L258
warning: redundant field names in struct initialization --> src/api/ecdar_api.rs:258:21 | 258 | result: result, | ^^^^^^^^^^^^^^ help: replace it with: `result` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `#[warn(clippy::redundant_field_names)]` on by default
used `unwrap()` on a `Result` value: target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs#L1918
warning: used `unwrap()` on a `Result` value --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs:1918:29 | 1918 | / ... http::Response::builder() 1919 | | ... .status(200) 1920 | | ... .header("grpc-status", "12") 1921 | | ... .header("content-type", "application/grpc") 1922 | | ... .body(empty_body()) 1923 | | ... .unwrap(), | |___________________________________^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used = note: requested on the command line with `-W clippy::unwrap-used`
used `unwrap()` on a `Result` value: target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs#L2693
warning: used `unwrap()` on a `Result` value --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs:2693:29 | 2693 | / ... http::Response::builder() 2694 | | ... .status(200) 2695 | | ... .header("grpc-status", "12") 2696 | | ... .header("content-type", "application/grpc") 2697 | | ... .body(empty_body()) 2698 | | ... .unwrap(), | |___________________________________^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
used `unwrap()` on a `Result` value: target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs#L2924
warning: used `unwrap()` on a `Result` value --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs:2924:29 | 2924 | / ... http::Response::builder() 2925 | | ... .status(200) 2926 | | ... .header("grpc-status", "12") 2927 | | ... .header("content-type", "application/grpc") 2928 | | ... .body(empty_body()) 2929 | | ... .unwrap(), | |___________________________________^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
used `unwrap()` on a `Result` value: target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs#L1918
warning: used `unwrap()` on a `Result` value --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs:1918:29 | 1918 | / ... http::Response::builder() 1919 | | ... .status(200) 1920 | | ... .header("grpc-status", "12") 1921 | | ... .header("content-type", "application/grpc") 1922 | | ... .body(empty_body()) 1923 | | ... .unwrap(), | |___________________________________^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
used `unwrap()` on a `Result` value: target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs#L2693
warning: used `unwrap()` on a `Result` value --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs:2693:29 | 2693 | / ... http::Response::builder() 2694 | | ... .status(200) 2695 | | ... .header("grpc-status", "12") 2696 | | ... .header("content-type", "application/grpc") 2697 | | ... .body(empty_body()) 2698 | | ... .unwrap(), | |___________________________________^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
used `unwrap()` on a `Result` value: target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs#L2924
warning: used `unwrap()` on a `Result` value --> /home/runner/work/Ecdar-API/Ecdar-API/target/debug/build/api_server-0a97bb8a4683af29/out/ecdar_proto_buf.rs:2924:29 | 2924 | / ... http::Response::builder() 2925 | | ... .status(200) 2926 | | ... .header("grpc-status", "12") 2927 | | ... .header("content-type", "application/grpc") 2928 | | ... .body(empty_body()) 2929 | | ... .unwrap(), | |___________________________________^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
used `unwrap()` on a `Result` value: src/api/../tests/api/auth.rs#L13
warning: used `unwrap()` on a `Result` value --> src/api/../tests/api/auth.rs:13:38 | 13 | .insert("authorization", MetadataValue::from_str(token).unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used = note: requested on the command line with `-W clippy::unwrap-used`