Skip to content

Merge pull request #41 from idky137/add_conf_toml #111

Merge pull request #41 from idky137/add_conf_toml

Merge pull request #41 from idky137/add_conf_toml #111

GitHub Actions / Clippy (MSRV) failed Sep 5, 2024 in 0s

Clippy (MSRV)

26 errors

Details

Results

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

Versions

  • rustc 1.76.0 (07dca489a 2024-02-04)
  • cargo 1.76.0 (c84b36747 2024-01-18)
  • clippy 0.1.76 (07dca48 2024-02-04)

Annotations

Check failure on line 448 in zingo-rpc/src/walletrpc/service.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/walletrpc/service.rs:445:25
    |
445 | /                         return Err(Status::invalid_argument(format!(
446 | |                             "Failed to parse nym address: {}",
447 | |                             e
448 | |                         )));
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
445 ~                         Err(Status::invalid_argument(format!(
446 +                             "Failed to parse nym address: {}",
447 +                             e
448 ~                         )))
    |

Check failure on line 448 in zingo-rpc/src/walletrpc/service.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/walletrpc/service.rs:445:25
    |
445 | /                         return Err(Status::invalid_argument(format!(
446 | |                             "Failed to parse nym address: {}",
447 | |                             e
448 | |                         )));
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
445 ~                         Err(Status::invalid_argument(format!(
446 +                             "Failed to parse nym address: {}",
447 +                             e
448 ~                         )))
    |

Check failure on line 260 in zingo-rpc/src/walletrpc/service.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/walletrpc/service.rs:257:25
    |
257 | /                         return Err(Status::invalid_argument(format!(
258 | |                             "Failed to parse nym address: {}",
259 | |                             e
260 | |                         )));
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
257 ~                         Err(Status::invalid_argument(format!(
258 +                             "Failed to parse nym address: {}",
259 +                             e
260 ~                         )))
    |

Check failure on line 260 in zingo-rpc/src/walletrpc/service.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/walletrpc/service.rs:257:25
    |
257 | /                         return Err(Status::invalid_argument(format!(
258 | |                             "Failed to parse nym address: {}",
259 | |                             e
260 | |                         )));
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
257 ~                         Err(Status::invalid_argument(format!(
258 +                             "Failed to parse nym address: {}",
259 +                             e
260 ~                         )))
    |

Check failure on line 174 in zingo-rpc/src/server.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

this function has too many arguments (11/7)

error: this function has too many arguments (11/7)
   --> zingo-rpc/src/server.rs:162:5
    |
162 | /     pub async fn spawn(
163 | |         tcp_active: bool,
164 | |         tcp_ingestor_listen_addr: Option<SocketAddr>,
165 | |         nym_active: bool,
...   |
173 | |         online: Arc<AtomicBool>,
174 | |     ) -> Result<Self, ServerError> {
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check failure on line 373 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do

error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
   --> zingo-rpc/src/server/worker.rs:373:25
    |
373 |         worker_handles: &mut Vec<Option<tokio::task::JoinHandle<Result<(), WorkerError>>>>,
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [Option<tokio::task::JoinHandle<Result<(), WorkerError>>>]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
    = note: `-D clippy::ptr-arg` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::ptr_arg)]`

Check failure on line 340 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/server/worker.rs:340:21
    |
340 |                     return Ok(());
    |                     ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
340 ~                     Ok(())
341 |                 }
342 ~             }
    |

Check failure on line 332 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/server/worker.rs:332:25
    |
332 |                         return Ok(());
    |                         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
332 ~                         Ok(())
333 |                     }
  ...
341 |                 }
342 ~             }
    |

Check failure on line 325 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/server/worker.rs:325:25
    |
325 |                         return Ok(());
    |                         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `-D clippy::needless-return` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
    |
325 ~                         Ok(())
326 |                     }
  ...
341 |                 }
342 ~             }
    |

Check failure on line 247 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

this function has too many arguments (9/7)

error: this function has too many arguments (9/7)
   --> zingo-rpc/src/server/worker.rs:237:5
    |
237 | /     pub async fn spawn(
238 | |         max_size: u16,
239 | |         idle_size: u16,
240 | |         queue: QueueReceiver<ZingoIndexerRequest>,
...   |
246 | |         online: Arc<AtomicBool>,
247 | |     ) -> Self {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check failure on line 61 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

this function has too many arguments (8/7)

error: this function has too many arguments (8/7)
  --> zingo-rpc/src/server/worker.rs:52:5
   |
52 | /     pub async fn spawn(
53 | |         worker_id: usize,
54 | |         queue: QueueReceiver<ZingoIndexerRequest>,
55 | |         requeue: QueueSender<ZingoIndexerRequest>,
...  |
60 | |         online: Arc<AtomicBool>,
61 | |     ) -> Self {
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
   = note: `-D clippy::too-many-arguments` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::too_many_arguments)]`

Check failure on line 174 in zingo-rpc/src/server.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

this function has too many arguments (11/7)

error: this function has too many arguments (11/7)
   --> zingo-rpc/src/server.rs:162:5
    |
162 | /     pub async fn spawn(
163 | |         tcp_active: bool,
164 | |         tcp_ingestor_listen_addr: Option<SocketAddr>,
165 | |         nym_active: bool,
...   |
173 | |         online: Arc<AtomicBool>,
174 | |     ) -> Result<Self, ServerError> {
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check failure on line 373 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do

error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
   --> zingo-rpc/src/server/worker.rs:373:25
    |
373 |         worker_handles: &mut Vec<Option<tokio::task::JoinHandle<Result<(), WorkerError>>>>,
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [Option<tokio::task::JoinHandle<Result<(), WorkerError>>>]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
    = note: `-D clippy::ptr-arg` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::ptr_arg)]`

Check failure on line 340 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/server/worker.rs:340:21
    |
340 |                     return Ok(());
    |                     ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
340 ~                     Ok(())
341 |                 }
342 ~             }
    |

Check failure on line 332 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/server/worker.rs:332:25
    |
332 |                         return Ok(());
    |                         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
332 ~                         Ok(())
333 |                     }
  ...
341 |                 }
342 ~             }
    |

Check failure on line 325 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

unneeded `return` statement

error: unneeded `return` statement
   --> zingo-rpc/src/server/worker.rs:325:25
    |
325 |                         return Ok(());
    |                         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `-D clippy::needless-return` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
    |
325 ~                         Ok(())
326 |                     }
  ...
341 |                 }
342 ~             }
    |

Check failure on line 247 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

this function has too many arguments (9/7)

error: this function has too many arguments (9/7)
   --> zingo-rpc/src/server/worker.rs:237:5
    |
237 | /     pub async fn spawn(
238 | |         max_size: u16,
239 | |         idle_size: u16,
240 | |         queue: QueueReceiver<ZingoIndexerRequest>,
...   |
246 | |         online: Arc<AtomicBool>,
247 | |     ) -> Self {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check failure on line 61 in zingo-rpc/src/server/worker.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

this function has too many arguments (8/7)

error: this function has too many arguments (8/7)
  --> zingo-rpc/src/server/worker.rs:52:5
   |
52 | /     pub async fn spawn(
53 | |         worker_id: usize,
54 | |         queue: QueueReceiver<ZingoIndexerRequest>,
55 | |         requeue: QueueSender<ZingoIndexerRequest>,
...  |
60 | |         online: Arc<AtomicBool>,
61 | |     ) -> Self {
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
   = note: `-D clippy::too-many-arguments` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::too_many_arguments)]`

Check failure on line 70 in zingo-rpc/src/primitives/block.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

redundant closure

error: redundant closure
  --> zingo-rpc/src/primitives/block.rs:70:30
   |
70 |         hex::decode(hex).map(|bytes| SerializedBlock::from(bytes))
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `SerializedBlock::from`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
   = note: `-D clippy::redundant-closure` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`

Check failure on line 25 in zingo-rpc/src/nym/utils.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

needlessly taken reference of both operands

error: needlessly taken reference of both operands
  --> zingo-rpc/src/nym/utils.rs:25:8
   |
25 |     if &body_len != &data[cursor.position() as usize..].len() {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
   = note: `-D clippy::op-ref` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::op_ref)]`
help: use the values directly
   |
25 |     if body_len != data[cursor.position() as usize..].len() {
   |        ~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 45 in zingo-rpc/src/nym/error.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

useless use of `format!`

error: useless use of `format!`
  --> zingo-rpc/src/nym/error.rs:45:41
   |
45 |                 tonic::Status::internal(format!("No AnonSenderTag received from nym mixnet"))
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No AnonSenderTag received from nym mixnet".to_string()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check failure on line 42 in zingo-rpc/src/nym/error.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

useless use of `format!`

error: useless use of `format!`
  --> zingo-rpc/src/nym/error.rs:42:41
   |
42 |                 tonic::Status::internal(format!("Empty message received from nym mixnet"))
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Empty message received from nym mixnet".to_string()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
   = note: `-D clippy::useless-format` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::useless_format)]`

Check failure on line 70 in zingo-rpc/src/primitives/block.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

redundant closure

error: redundant closure
  --> zingo-rpc/src/primitives/block.rs:70:30
   |
70 |         hex::decode(hex).map(|bytes| SerializedBlock::from(bytes))
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `SerializedBlock::from`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
   = note: `-D clippy::redundant-closure` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`

Check failure on line 25 in zingo-rpc/src/nym/utils.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

needlessly taken reference of both operands

error: needlessly taken reference of both operands
  --> zingo-rpc/src/nym/utils.rs:25:8
   |
25 |     if &body_len != &data[cursor.position() as usize..].len() {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
   = note: `-D clippy::op-ref` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::op_ref)]`
help: use the values directly
   |
25 |     if body_len != data[cursor.position() as usize..].len() {
   |        ~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 45 in zingo-rpc/src/nym/error.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

useless use of `format!`

error: useless use of `format!`
  --> zingo-rpc/src/nym/error.rs:45:41
   |
45 |                 tonic::Status::internal(format!("No AnonSenderTag received from nym mixnet"))
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"No AnonSenderTag received from nym mixnet".to_string()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format