Skip to content

Frontend: format

Frontend: format #141

GitHub Actions / clippy failed Nov 29, 2023 in 1s

clippy

4 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 4
Warning 0
Note 0
Help 0

Versions

  • rustc 1.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

Annotations

Check failure on line 115 in backend/src/handler/frontend.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `handler::frontend::IndexTemplate: askama::Template` is not satisfied

error[E0277]: the trait bound `handler::frontend::IndexTemplate: askama::Template` is not satisfied
   --> backend/src/handler/frontend.rs:115:59
    |
115 |                 let mut resp = askama_axum::into_response(&template);
    |                                -------------------------- ^^^^^^^^^ the trait `askama::Template` is not implemented for `handler::frontend::IndexTemplate`
    |                                |
    |                                required by a bound introduced by this call
    |
note: required by a bound in `askama_axum::into_response`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/askama_axum-0.3.0/src/lib.rs:9:25
    |
9   | pub fn into_response<T: Template>(t: &T) -> Response {
    |                         ^^^^^^^^ required by this bound in `into_response`

Check failure on line 115 in backend/src/handler/frontend.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the trait bound `handler::frontend::IndexTemplate: askama::Template` is not satisfied

error[E0277]: the trait bound `handler::frontend::IndexTemplate: askama::Template` is not satisfied
   --> backend/src/handler/frontend.rs:115:59
    |
115 |                 let mut resp = askama_axum::into_response(&template);
    |                                -------------------------- ^^^^^^^^^ the trait `askama::Template` is not implemented for `handler::frontend::IndexTemplate`
    |                                |
    |                                required by a bound introduced by this call
    |
note: required by a bound in `askama_axum::into_response`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/askama_axum-0.3.0/src/lib.rs:9:25
    |
9   | pub fn into_response<T: Template>(t: &T) -> Response {
    |                         ^^^^^^^^ required by this bound in `into_response`

Check failure on line 77 in backend/src/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `else { if .. }` block can be collapsed

error: this `else { if .. }` block can be collapsed
  --> backend/src/error.rs:61:16
   |
61 |           } else {
   |  ________________^
62 | |             if CONFIG.debug {
63 | |                 tracing::warn!(
64 | |                     "responding client error, id: {}\n{:?}\nContext\n{}",
...  |
76 | |             }
77 | |         }
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
   = note: `-D clippy::collapsible-else-if` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
   |
61 ~         } else if CONFIG.debug {
62 +             tracing::warn!(
63 +                 "responding client error, id: {}\n{:?}\nContext\n{}",
64 +                 self.id,
65 +                 self.inner,
66 +                 self.context
67 +             );
68 +         } else {
69 +             tracing::debug!(
70 +                 "responding client error, id: {}\n{:?}\nContext\n{}",
71 +                 self.id,
72 +                 self.inner,
73 +                 self.context
74 +             );
75 +         }
   |

Check failure on line 77 in backend/src/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `else { if .. }` block can be collapsed

error: this `else { if .. }` block can be collapsed
  --> backend/src/error.rs:61:16
   |
61 |           } else {
   |  ________________^
62 | |             if CONFIG.debug {
63 | |                 tracing::warn!(
64 | |                     "responding client error, id: {}\n{:?}\nContext\n{}",
...  |
76 | |             }
77 | |         }
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
   = note: `-D clippy::collapsible-else-if` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
   |
61 ~         } else if CONFIG.debug {
62 +             tracing::warn!(
63 +                 "responding client error, id: {}\n{:?}\nContext\n{}",
64 +                 self.id,
65 +                 self.inner,
66 +                 self.context
67 +             );
68 +         } else {
69 +             tracing::debug!(
70 +                 "responding client error, id: {}\n{:?}\nContext\n{}",
71 +                 self.id,
72 +                 self.inner,
73 +                 self.context
74 +             );
75 +         }
   |