Skip to content

Fix compilation error #641

Fix compilation error

Fix compilation error #641

GitHub Actions / clippy succeeded Sep 6, 2024 in 0s

clippy

5 warnings

Details

Results

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

Versions

  • rustc 1.81.0 (eeb90cda1 2024-09-04)
  • cargo 1.81.0 (2dbb1af80 2024-08-20)
  • clippy 0.1.81 (eeb90cd 2024-09-04)

Annotations

Check warning on line 138 in casper-server/src/middleware/trace.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `map_err` over `inspect_err`

warning: using `map_err` over `inspect_err`
   --> casper-server/src/middleware/trace.rs:138:10
    |
138 |         .map_err(|err| {
    |          ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
help: try
    |
138 ~         .inspect_err(|err| {
139 |             let span = otel_cx.span();
140 ~             span.set_status(trace::Status::error(err.to_string()));
    |

Check warning on line 288 in casper-server/src/lua/storage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> casper-server/src/lua/storage.rs:288:64
    |
288 |                 Err(err) => Ok(Value::String(lua.create_string(&err.into().to_string())?)),
    |                                                                ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `err.into().to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 148 in casper-server/src/lua/storage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> casper-server/src/lua/storage.rs:148:64
    |
148 |                 Err(err) => Ok(Value::String(lua.create_string(&err.into().to_string())?)),
    |                                                                ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `err.into().to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check warning on line 85 in casper-server/src/lua/http/body.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `map` over `inspect`

warning: using `map` over `inspect`
  --> casper-server/src/lua/http/body.rs:85:40
   |
85 |             _ => Ok(self.read().await?.map(|b| {
   |                                        ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
   = note: `#[warn(clippy::manual_inspect)]` on by default
help: try
   |
85 ~             _ => Ok(self.read().await?.inspect(|b| {
86 ~                 *self = LuaBody::Bytes(b.clone());
   |

Check warning on line 378 in casper-server/src/storage/backends/redis/client.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function depends on never type fallback being `()`

warning: this function depends on never type fallback being `()`
   --> casper-server/src/storage/backends/redis/client.rs:378:5
    |
378 |     async fn store_response_inner<'a>(&self, item: Item<'a>) -> Result<usize> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
    = help: specify the types explicitly
note: in edition 2024, the requirement `!: fred::types::FromRedis` will fail
   --> casper-server/src/storage/backends/redis/client.rs:433:22
    |
433 |                     .set(
    |                      ^^^
    = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default