applied clippy suggestions #244
check_format.yml
on: push
cargo fmt
23s
Clippy lint and check
28s
Annotations
10 warnings
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`
|
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`
|
used `unwrap()` on a `Result` value:
src/api/../tests/api/auth.rs#L15
warning: used `unwrap()` on a `Result` value
--> src/api/../tests/api/auth.rs:15:22
|
15 | let result = request.token_str().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 an `Option` value:
src/api/../tests/api/auth.rs#L17
warning: used `unwrap()` on an `Option` value
--> src/api/../tests/api/auth.rs:17:20
|
17 | assert_eq!(result.unwrap(), token.trim_start_matches("Bearer "));
| ^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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
|