Skip to content

Fix large transfers #369

Fix large transfers

Fix large transfers #369

GitHub Actions / clippy succeeded Apr 13, 2024 in 0s

clippy

16 warnings

Details

Results

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

Versions

  • rustc 1.79.0-nightly (79424056b 2024-04-12)
  • cargo 1.79.0-nightly (74fd5bc73 2024-04-10)
  • clippy 0.1.79 (7942405 2024-04-12)

Annotations

Check warning on line 69 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
  --> src/lib.rs:69:29
   |
69 |             max_frame_size: std::u16::MAX as u32,
   |                             ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
   |
69 |             max_frame_size: u16::MAX as u32,
   |                             ~~~~~~~~

Check warning on line 1177 in src/session.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
    --> src/session.rs:1177:30
     |
1177 |             incoming_window: std::u32::MAX,
     |                              ^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
     |
1177 |             incoming_window: u32::MAX,
     |                              ~~~~~~~~

Check warning on line 1150 in src/session.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
    --> src/session.rs:1150:34
     |
1150 |                 incoming_window: std::u32::MAX,
     |                                  ^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
     |
1150 |                 incoming_window: u32::MAX,
     |                                  ~~~~~~~~

Check warning on line 310 in src/connection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/connection.rs:310:25
    |
310 |             handle_max: std::u32::MAX,
    |                         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
310 |             handle_max: u32::MAX,
    |                         ~~~~~~~~

Check warning on line 308 in src/connection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/connection.rs:308:30
    |
308 |             incoming_window: std::u32::MAX,
    |                              ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
308 |             incoming_window: u32::MAX,
    |                              ~~~~~~~~

Check warning on line 200 in src/connection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/connection.rs:200:37
    |
200 |                         handle_max: std::u32::MAX,
    |                                     ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
200 |                         handle_max: u32::MAX,
    |                                     ~~~~~~~~

Check warning on line 199 in src/connection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/connection.rs:199:42
    |
199 |                         outgoing_window: std::u32::MAX,
    |                                          ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
199 |                         outgoing_window: u32::MAX,
    |                                          ~~~~~~~~

Check warning on line 198 in src/connection.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/connection.rs:198:42
    |
198 |                         incoming_window: std::u32::MAX,
    |                                          ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
    |
198 |                         incoming_window: u32::MAX,
    |                                          ~~~~~~~~

Check warning on line 10 in src/cell.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

struct `WeakCell` is never constructed

warning: struct `WeakCell` is never constructed
  --> src/cell.rs:10:19
   |
10 | pub(crate) struct WeakCell<T> {
   |                   ^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 5 in codec/src/protocol/definitions.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> codec/src/protocol/definitions.rs:5:5
  |
5 | use std::u8;
  |     ^^^^^^^
  |
  = help: remove this import
  = note: then `u8::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

Check warning on line 263 in codec/src/message/message.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> codec/src/message/message.rs:263:40
    |
263 |             msg.set_properties(|props| props.correlation_id = data.message_id.clone());
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `props.correlation_id.clone_from(&data.message_id)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `#[warn(clippy::assigning_clones)]` on by default

Check warning on line 78 in codec/src/message/body.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
  --> codec/src/message/body.rs:78:25
   |
78 |             if length > std::u8::MAX as usize {
   |                         ^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
   |
78 |             if length > u8::MAX as usize {
   |                         ~~~~~~~

Check warning on line 48 in codec/src/message/body.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
  --> codec/src/message/body.rs:48:45
   |
48 |             let size = length + if length > std::u8::MAX as usize { 5 } else { 2 };
   |                                             ^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
   |
48 |             let size = length + if length > u8::MAX as usize { 5 } else { 2 };
   |                                             ~~~~~~~

Check warning on line 2 in codec/src/codec/encode.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> codec/src/codec/encode.rs:2:37
  |
2 | use std::{collections::HashMap, i8, u8};
  |                                     ^^
  |
  = help: remove this import
  = note: then `u8::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

Check warning on line 2 in codec/src/codec/encode.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> codec/src/codec/encode.rs:2:33
  |
2 | use std::{collections::HashMap, i8, u8};
  |                                 ^^
  |
  = help: remove this import
  = note: then `i8::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

Check warning on line 1 in codec/src/codec/decode.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> codec/src/codec/decode.rs:1:79
  |
1 | use std::{char, collections, convert::TryFrom, hash::BuildHasher, hash::Hash, u8};
  |                                                                               ^^
  |
  = help: remove this import
  = note: then `u8::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
  = note: `#[warn(clippy::legacy_numeric_constants)]` on by default