Skip to content

removed expect

removed expect #242

Triggered via push December 7, 2023 10:19
Status Failure
Total duration 52s
Artifacts

check_format.yml

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

Annotations

3 errors and 10 warnings
question mark operator is useless here: src/api/auth.rs#L304
error: question mark operator is useless here --> src/api/auth.rs:304:9 | 304 | Some(uid.parse().ok()?) | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `uid.parse().ok()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `-D clippy::needless-question-mark` implied by `-D clippy::complexity` = help: to override `-D clippy::complexity` add `#[allow(clippy::needless_question_mark)]`
question mark operator is useless here: src/api/auth.rs#L304
error: question mark operator is useless here --> src/api/auth.rs:304:9 | 304 | Some(uid.parse().ok()?) | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Some()`: `uid.parse().ok()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `-D clippy::needless-question-mark` implied by `-D clippy::complexity` = help: to override `-D clippy::complexity` add `#[allow(clippy::needless_question_mark)]`
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`
unused import: `DbErr`: src/api/ecdar_api.rs#L22
warning: unused import: `DbErr` --> src/api/ecdar_api.rs:22:15 | 22 | use sea_orm::{DbErr, SqlErr}; | ^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused variable: `err`: src/api/ecdar_api.rs#L99
warning: unused variable: `err` --> src/api/ecdar_api.rs:99:31 | 99 | .map_err(|err| Status::internal("failed to get token from request metadata"))? | ^^^ help: if this is intentional, prefix it with an underscore: `_err` | = note: `#[warn(unused_variables)]` on by default
unused import: `DbErr`: src/api/ecdar_api.rs#L22
warning: unused import: `DbErr` --> src/api/ecdar_api.rs:22:15 | 22 | use sea_orm::{DbErr, SqlErr}; | ^^^^^ | = note: `#[warn(unused_imports)]` on by default
unused variable: `err`: src/api/ecdar_api.rs#L99
warning: unused variable: `err` --> src/api/ecdar_api.rs:99:31 | 99 | .map_err(|err| Status::internal("failed to get token from request metadata"))? | ^^^ help: if this is intentional, prefix it with an underscore: `_err` | = note: `#[warn(unused_variables)]` on by default
unused variable: `err`: src/api/ecdar_api.rs#L206
warning: unused variable: `err` --> src/api/ecdar_api.rs:206:47 | 206 | ... .map_err(|err| { | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
unused variable: `err`: src/api/ecdar_api.rs#L334
warning: unused variable: `err` --> src/api/ecdar_api.rs:334:31 | 334 | .map_err(|err| Status::internal("failed to get token from request metadata"))? | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
unused variable: `err`: src/api/ecdar_api.rs#L419
warning: unused variable: `err` --> src/api/ecdar_api.rs:419:31 | 419 | .map_err(|err| Status::internal("failed to get token from request metadata"))? | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
unused variable: `err`: src/api/ecdar_api.rs#L867
warning: unused variable: `err` --> src/api/ecdar_api.rs:867:31 | 867 | .map_err(|err| Status::internal("failed to get token from request metadata"))? | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
unused variable: `err`: src/api/ecdar_api.rs#L206
warning: unused variable: `err` --> src/api/ecdar_api.rs:206:47 | 206 | ... .map_err(|err| { | ^^^ help: if this is intentional, prefix it with an underscore: `_err`