v2.5.4 #515
Annotations
78 warnings
|
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
this `map_or` can be simplified:
src/topology_internal.rs#L114
warning: this `map_or` can be simplified
--> src/topology_internal.rs:114:9
|
114 | self.definition.options.map_or(false, |o| o.exclusive)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_some_and instead
|
114 - self.definition.options.map_or(false, |o| o.exclusive)
114 + self.definition.options.is_some_and(|o| o.exclusive)
|
|
|
variables can be used directly in the `format!` string:
src/io_loop.rs#L437
warning: variables can be used directly in the `format!` string
--> src/io_loop.rs:437:25
|
437 | format!("frame too large: {} bytes", consumed).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
437 - format!("frame too large: {} bytes", consumed).into(),
437 + format!("frame too large: {consumed} bytes").into(),
|
|
|
unnecessary closure used to substitute value for `Option::None`:
src/io_loop.rs#L180
warning: unnecessary closure used to substitute value for `Option::None`
--> src/io_loop.rs:180:25
|
180 | / self.frames.poison().unwrap_or_else(|| {
181 | | Error::InvalidConnectionState(ConnectionState::Closed)
182 | | }),
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-W clippy::unnecessary-lazy-evaluations` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_lazy_evaluations)]`
help: use `unwrap_or` instead
|
180 ~ self.frames.poison().unwrap_or({
181 + Error::InvalidConnectionState(ConnectionState::Closed)
182 ~ }),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L71
warning: variables can be used directly in the `format!` string
--> src/error.rs:71:45
|
71 | Error::SerialisationError(e) => write!(f, "failed to serialise: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
71 - Error::SerialisationError(e) => write!(f, "failed to serialise: {}", e),
71 + Error::SerialisationError(e) => write!(f, "failed to serialise: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L70
warning: variables can be used directly in the `format!` string
--> src/error.rs:70:40
|
70 | Error::ProtocolError(e) => write!(f, "protocol error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
70 - Error::ProtocolError(e) => write!(f, "protocol error: {}", e),
70 + Error::ProtocolError(e) => write!(f, "protocol error: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L69
warning: variables can be used directly in the `format!` string
--> src/error.rs:69:39
|
69 | Error::ParsingError(e) => write!(f, "failed to parse: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
69 - Error::ParsingError(e) => write!(f, "failed to parse: {}", e),
69 + Error::ParsingError(e) => write!(f, "failed to parse: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L68
warning: variables can be used directly in the `format!` string
--> src/error.rs:68:34
|
68 | Error::IOError(e) => write!(f, "IO error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
68 - Error::IOError(e) => write!(f, "IO error: {}", e),
68 + Error::IOError(e) => write!(f, "IO error: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L65
warning: variables can be used directly in the `format!` string
--> src/error.rs:65:17
|
65 | write!(f, "invalid connection state: {:?}", state)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
65 - write!(f, "invalid connection state: {:?}", state)
65 + write!(f, "invalid connection state: {state:?}")
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L63
warning: variables can be used directly in the `format!` string
--> src/error.rs:63:50
|
63 | Error::InvalidChannelState(state) => write!(f, "invalid channel state: {:?}", state),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
63 - Error::InvalidChannelState(state) => write!(f, "invalid channel state: {:?}", state),
63 + Error::InvalidChannelState(state) => write!(f, "invalid channel state: {state:?}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L62
warning: variables can be used directly in the `format!` string
--> src/error.rs:62:47
|
62 | Error::InvalidChannel(channel) => write!(f, "invalid channel: {}", channel),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
62 - Error::InvalidChannel(channel) => write!(f, "invalid channel: {}", channel),
62 + Error::InvalidChannel(channel) => write!(f, "invalid channel: {channel}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L59
warning: variables can be used directly in the `format!` string
--> src/error.rs:59:17
|
59 | write!(f, "the server only supports AMQP {}", version)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
59 - write!(f, "the server only supports AMQP {}", version)
59 + write!(f, "the server only supports AMQP {version}")
|
|
|
this can be `std::io::Error::other(_)`:
src/connection.rs#L485
warning: this can be `std::io::Error::other(_)`
--> src/connection.rs:485:29
|
485 | Err(err) => Err(io::Error::new(io::ErrorKind::Other, err).into()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `-W clippy::io-other-error` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::io_other_error)]`
help: use `std::io::Error::other`
|
485 - Err(err) => Err(io::Error::new(io::ErrorKind::Other, err).into()),
485 + Err(err) => Err(io::Error::other(err).into()),
|
|
|
using `map_err` over `inspect_err`:
src/connection.rs#L395
warning: using `map_err` over `inspect_err`
--> src/connection.rs:395:14
|
395 | .map_err(|error| {
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
help: try
|
395 ~ .inspect_err(|error| {
396 | // We don't actually need the resolver as we already pass it around to the failing
397 | // code which will propagate the error. We only want to flush the status internal
398 | // state.
399 ~ let _ = status.connection_resolver();
|
|
|
variables can be used directly in the `format!` string:
src/channels.rs#L230
warning: variables can be used directly in the `format!` string
--> src/channels.rs:230:25
|
230 | format!("content header frame received on channel {}", channel_id).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
230 - format!("content header frame received on channel {}", channel_id).into(),
230 + format!("content header frame received on channel {channel_id}").into(),
|
|
|
variables can be used directly in the `format!` string:
src/channels.rs#L207
warning: variables can be used directly in the `format!` string
--> src/channels.rs:207:25
|
207 | format!("heartbeat frame received on channel {}", channel_id).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
207 - format!("heartbeat frame received on channel {}", channel_id).into(),
207 + format!("heartbeat frame received on channel {channel_id}").into(),
|
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L90
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:90:27
|
90 | error_handler(format!(
| ___________________________^
91 | | "unexpected content body frame received on channel {}",
92 | | channel_id
93 | | ))
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L87
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:87:31
|
87 | ...ler(format!("unexpectedly large content body frame received on channel {} ({} bytes, expected {} bytes)", channel_id, length, len))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
87 - error_handler(format!("unexpectedly large content body frame received on channel {} ({} bytes, expected {} bytes)", channel_id, length, len))
87 + error_handler(format!("unexpectedly large content body frame received on channel {channel_id} ({length} bytes, expected {len} bytes)"))
|
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L56
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:56:27
|
56 | error_handler(format!(
| ___________________________^
57 | | "unexpected content header frame received on channel {}",
58 | | channel_id
59 | | ))
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L50
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:50:39
|
50 | invalid_class_hanlder(format!(
| _______________________________________^
51 | | "content header frame with class id {} instead of {} received on channel {}",
52 | | class_id, expected_class_id, channel_id
53 | | ))
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-W clippy::uninlined-format-args` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::uninlined_format_args)]`
|
|
docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
usage of a legacy numeric method:
src/channel.rs#L632
warning: usage of a legacy numeric method
--> src/channel.rs:632:57
|
632 | self.configuration.set_frame_max(FrameSize::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
632 - self.configuration.set_frame_max(FrameSize::max_value());
632 + self.configuration.set_frame_max(FrameSize::MAX);
|
|
|
docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
usage of a legacy numeric method:
src/channel.rs#L621
warning: usage of a legacy numeric method
--> src/channel.rs:621:59
|
621 | self.configuration.set_channel_max(ChannelId::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-W clippy::legacy-numeric-constants` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
|
621 - self.configuration.set_channel_max(ChannelId::max_value());
621 + self.configuration.set_channel_max(ChannelId::MAX);
|
|
|
docs
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
using `map` over `inspect`:
src/buffer.rs#L239
warning: using `map` over `inspect`
--> src/buffer.rs:239:28
|
239 | before(s, tmp).map(|s| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `-W clippy::manual-inspect` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_inspect)]`
help: try
|
239 ~ before(s, tmp).inspect(|s| {
240 ~ s.write.rollback(end);
|
|
|
this `map_or` can be simplified:
src/topology_internal.rs#L114
warning: this `map_or` can be simplified
--> src/topology_internal.rs:114:9
|
114 | self.definition.options.map_or(false, |o| o.exclusive)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_some_and instead
|
114 - self.definition.options.map_or(false, |o| o.exclusive)
114 + self.definition.options.is_some_and(|o| o.exclusive)
|
|
|
variables can be used directly in the `format!` string:
src/io_loop.rs#L437
warning: variables can be used directly in the `format!` string
--> src/io_loop.rs:437:25
|
437 | format!("frame too large: {} bytes", consumed).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
437 - format!("frame too large: {} bytes", consumed).into(),
437 + format!("frame too large: {consumed} bytes").into(),
|
|
|
unnecessary closure used to substitute value for `Option::None`:
src/io_loop.rs#L180
warning: unnecessary closure used to substitute value for `Option::None`
--> src/io_loop.rs:180:25
|
180 | / self.frames.poison().unwrap_or_else(|| {
181 | | Error::InvalidConnectionState(ConnectionState::Closed)
182 | | }),
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-W clippy::unnecessary-lazy-evaluations` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_lazy_evaluations)]`
help: use `unwrap_or` instead
|
180 ~ self.frames.poison().unwrap_or({
181 + Error::InvalidConnectionState(ConnectionState::Closed)
182 ~ }),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L71
warning: variables can be used directly in the `format!` string
--> src/error.rs:71:45
|
71 | Error::SerialisationError(e) => write!(f, "failed to serialise: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
71 - Error::SerialisationError(e) => write!(f, "failed to serialise: {}", e),
71 + Error::SerialisationError(e) => write!(f, "failed to serialise: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L70
warning: variables can be used directly in the `format!` string
--> src/error.rs:70:40
|
70 | Error::ProtocolError(e) => write!(f, "protocol error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
70 - Error::ProtocolError(e) => write!(f, "protocol error: {}", e),
70 + Error::ProtocolError(e) => write!(f, "protocol error: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L69
warning: variables can be used directly in the `format!` string
--> src/error.rs:69:39
|
69 | Error::ParsingError(e) => write!(f, "failed to parse: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
69 - Error::ParsingError(e) => write!(f, "failed to parse: {}", e),
69 + Error::ParsingError(e) => write!(f, "failed to parse: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L68
warning: variables can be used directly in the `format!` string
--> src/error.rs:68:34
|
68 | Error::IOError(e) => write!(f, "IO error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
68 - Error::IOError(e) => write!(f, "IO error: {}", e),
68 + Error::IOError(e) => write!(f, "IO error: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L65
warning: variables can be used directly in the `format!` string
--> src/error.rs:65:17
|
65 | write!(f, "invalid connection state: {:?}", state)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
65 - write!(f, "invalid connection state: {:?}", state)
65 + write!(f, "invalid connection state: {state:?}")
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L63
warning: variables can be used directly in the `format!` string
--> src/error.rs:63:50
|
63 | Error::InvalidChannelState(state) => write!(f, "invalid channel state: {:?}", state),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
63 - Error::InvalidChannelState(state) => write!(f, "invalid channel state: {:?}", state),
63 + Error::InvalidChannelState(state) => write!(f, "invalid channel state: {state:?}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L62
warning: variables can be used directly in the `format!` string
--> src/error.rs:62:47
|
62 | Error::InvalidChannel(channel) => write!(f, "invalid channel: {}", channel),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
62 - Error::InvalidChannel(channel) => write!(f, "invalid channel: {}", channel),
62 + Error::InvalidChannel(channel) => write!(f, "invalid channel: {channel}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L59
warning: variables can be used directly in the `format!` string
--> src/error.rs:59:17
|
59 | write!(f, "the server only supports AMQP {}", version)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
59 - write!(f, "the server only supports AMQP {}", version)
59 + write!(f, "the server only supports AMQP {version}")
|
|
|
this can be `std::io::Error::other(_)`:
src/connection.rs#L485
warning: this can be `std::io::Error::other(_)`
--> src/connection.rs:485:29
|
485 | Err(err) => Err(io::Error::new(io::ErrorKind::Other, err).into()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `-W clippy::io-other-error` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::io_other_error)]`
help: use `std::io::Error::other`
|
485 - Err(err) => Err(io::Error::new(io::ErrorKind::Other, err).into()),
485 + Err(err) => Err(io::Error::other(err).into()),
|
|
|
using `map_err` over `inspect_err`:
src/connection.rs#L395
warning: using `map_err` over `inspect_err`
--> src/connection.rs:395:14
|
395 | .map_err(|error| {
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
help: try
|
395 ~ .inspect_err(|error| {
396 | // We don't actually need the resolver as we already pass it around to the failing
397 | // code which will propagate the error. We only want to flush the status internal
398 | // state.
399 ~ let _ = status.connection_resolver();
|
|
|
variables can be used directly in the `format!` string:
src/channels.rs#L230
warning: variables can be used directly in the `format!` string
--> src/channels.rs:230:25
|
230 | format!("content header frame received on channel {}", channel_id).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
230 - format!("content header frame received on channel {}", channel_id).into(),
230 + format!("content header frame received on channel {channel_id}").into(),
|
|
|
variables can be used directly in the `format!` string:
src/channels.rs#L207
warning: variables can be used directly in the `format!` string
--> src/channels.rs:207:25
|
207 | format!("heartbeat frame received on channel {}", channel_id).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
207 - format!("heartbeat frame received on channel {}", channel_id).into(),
207 + format!("heartbeat frame received on channel {channel_id}").into(),
|
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L90
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:90:27
|
90 | error_handler(format!(
| ___________________________^
91 | | "unexpected content body frame received on channel {}",
92 | | channel_id
93 | | ))
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L87
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:87:31
|
87 | ...ler(format!("unexpectedly large content body frame received on channel {} ({} bytes, expected {} bytes)", channel_id, length, len))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
87 - error_handler(format!("unexpectedly large content body frame received on channel {} ({} bytes, expected {} bytes)", channel_id, length, len))
87 + error_handler(format!("unexpectedly large content body frame received on channel {channel_id} ({length} bytes, expected {len} bytes)"))
|
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L56
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:56:27
|
56 | error_handler(format!(
| ___________________________^
57 | | "unexpected content header frame received on channel {}",
58 | | channel_id
59 | | ))
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L50
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:50:39
|
50 | invalid_class_hanlder(format!(
| _______________________________________^
51 | | "content header frame with class id {} instead of {} received on channel {}",
52 | | class_id, expected_class_id, channel_id
53 | | ))
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-W clippy::uninlined-format-args` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::uninlined_format_args)]`
|
|
usage of a legacy numeric method:
src/channel.rs#L632
warning: usage of a legacy numeric method
--> src/channel.rs:632:57
|
632 | self.configuration.set_frame_max(FrameSize::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
632 - self.configuration.set_frame_max(FrameSize::max_value());
632 + self.configuration.set_frame_max(FrameSize::MAX);
|
|
|
usage of a legacy numeric method:
src/channel.rs#L621
warning: usage of a legacy numeric method
--> src/channel.rs:621:59
|
621 | self.configuration.set_channel_max(ChannelId::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-W clippy::legacy-numeric-constants` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
|
621 - self.configuration.set_channel_max(ChannelId::max_value());
621 + self.configuration.set_channel_max(ChannelId::MAX);
|
|
|
using `map` over `inspect`:
src/buffer.rs#L239
warning: using `map` over `inspect`
--> src/buffer.rs:239:28
|
239 | before(s, tmp).map(|s| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `-W clippy::manual-inspect` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_inspect)]`
help: try
|
239 ~ before(s, tmp).inspect(|s| {
240 ~ s.write.rollback(end);
|
|
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
this `map_or` can be simplified:
src/topology_internal.rs#L114
warning: this `map_or` can be simplified
--> src/topology_internal.rs:114:9
|
114 | self.definition.options.map_or(false, |o| o.exclusive)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_some_and instead
|
114 - self.definition.options.map_or(false, |o| o.exclusive)
114 + self.definition.options.is_some_and(|o| o.exclusive)
|
|
|
variables can be used directly in the `format!` string:
src/io_loop.rs#L437
warning: variables can be used directly in the `format!` string
--> src/io_loop.rs:437:25
|
437 | format!("frame too large: {} bytes", consumed).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
437 - format!("frame too large: {} bytes", consumed).into(),
437 + format!("frame too large: {consumed} bytes").into(),
|
|
|
unnecessary closure used to substitute value for `Option::None`:
src/io_loop.rs#L180
warning: unnecessary closure used to substitute value for `Option::None`
--> src/io_loop.rs:180:25
|
180 | / self.frames.poison().unwrap_or_else(|| {
181 | | Error::InvalidConnectionState(ConnectionState::Closed)
182 | | }),
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-W clippy::unnecessary-lazy-evaluations` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_lazy_evaluations)]`
help: use `unwrap_or` instead
|
180 ~ self.frames.poison().unwrap_or({
181 + Error::InvalidConnectionState(ConnectionState::Closed)
182 ~ }),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L71
warning: variables can be used directly in the `format!` string
--> src/error.rs:71:45
|
71 | Error::SerialisationError(e) => write!(f, "failed to serialise: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
71 - Error::SerialisationError(e) => write!(f, "failed to serialise: {}", e),
71 + Error::SerialisationError(e) => write!(f, "failed to serialise: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L70
warning: variables can be used directly in the `format!` string
--> src/error.rs:70:40
|
70 | Error::ProtocolError(e) => write!(f, "protocol error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
70 - Error::ProtocolError(e) => write!(f, "protocol error: {}", e),
70 + Error::ProtocolError(e) => write!(f, "protocol error: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L69
warning: variables can be used directly in the `format!` string
--> src/error.rs:69:39
|
69 | Error::ParsingError(e) => write!(f, "failed to parse: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
69 - Error::ParsingError(e) => write!(f, "failed to parse: {}", e),
69 + Error::ParsingError(e) => write!(f, "failed to parse: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L68
warning: variables can be used directly in the `format!` string
--> src/error.rs:68:34
|
68 | Error::IOError(e) => write!(f, "IO error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
68 - Error::IOError(e) => write!(f, "IO error: {}", e),
68 + Error::IOError(e) => write!(f, "IO error: {e}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L65
warning: variables can be used directly in the `format!` string
--> src/error.rs:65:17
|
65 | write!(f, "invalid connection state: {:?}", state)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
65 - write!(f, "invalid connection state: {:?}", state)
65 + write!(f, "invalid connection state: {state:?}")
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L63
warning: variables can be used directly in the `format!` string
--> src/error.rs:63:50
|
63 | Error::InvalidChannelState(state) => write!(f, "invalid channel state: {:?}", state),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
63 - Error::InvalidChannelState(state) => write!(f, "invalid channel state: {:?}", state),
63 + Error::InvalidChannelState(state) => write!(f, "invalid channel state: {state:?}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L62
warning: variables can be used directly in the `format!` string
--> src/error.rs:62:47
|
62 | Error::InvalidChannel(channel) => write!(f, "invalid channel: {}", channel),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
62 - Error::InvalidChannel(channel) => write!(f, "invalid channel: {}", channel),
62 + Error::InvalidChannel(channel) => write!(f, "invalid channel: {channel}"),
|
|
|
variables can be used directly in the `format!` string:
src/error.rs#L59
warning: variables can be used directly in the `format!` string
--> src/error.rs:59:17
|
59 | write!(f, "the server only supports AMQP {}", version)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
59 - write!(f, "the server only supports AMQP {}", version)
59 + write!(f, "the server only supports AMQP {version}")
|
|
|
this can be `std::io::Error::other(_)`:
src/connection.rs#L485
warning: this can be `std::io::Error::other(_)`
--> src/connection.rs:485:29
|
485 | Err(err) => Err(io::Error::new(io::ErrorKind::Other, err).into()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `-W clippy::io-other-error` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::io_other_error)]`
help: use `std::io::Error::other`
|
485 - Err(err) => Err(io::Error::new(io::ErrorKind::Other, err).into()),
485 + Err(err) => Err(io::Error::other(err).into()),
|
|
|
using `map_err` over `inspect_err`:
src/connection.rs#L395
warning: using `map_err` over `inspect_err`
--> src/connection.rs:395:14
|
395 | .map_err(|error| {
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
help: try
|
395 ~ .inspect_err(|error| {
396 | // We don't actually need the resolver as we already pass it around to the failing
397 | // code which will propagate the error. We only want to flush the status internal
398 | // state.
399 ~ let _ = status.connection_resolver();
|
|
|
variables can be used directly in the `format!` string:
src/channels.rs#L230
warning: variables can be used directly in the `format!` string
--> src/channels.rs:230:25
|
230 | format!("content header frame received on channel {}", channel_id).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
230 - format!("content header frame received on channel {}", channel_id).into(),
230 + format!("content header frame received on channel {channel_id}").into(),
|
|
|
variables can be used directly in the `format!` string:
src/channels.rs#L207
warning: variables can be used directly in the `format!` string
--> src/channels.rs:207:25
|
207 | format!("heartbeat frame received on channel {}", channel_id).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
207 - format!("heartbeat frame received on channel {}", channel_id).into(),
207 + format!("heartbeat frame received on channel {channel_id}").into(),
|
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L90
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:90:27
|
90 | error_handler(format!(
| ___________________________^
91 | | "unexpected content body frame received on channel {}",
92 | | channel_id
93 | | ))
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L87
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:87:31
|
87 | ...ler(format!("unexpectedly large content body frame received on channel {} ({} bytes, expected {} bytes)", channel_id, length, len))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
87 - error_handler(format!("unexpectedly large content body frame received on channel {} ({} bytes, expected {} bytes)", channel_id, length, len))
87 + error_handler(format!("unexpectedly large content body frame received on channel {channel_id} ({length} bytes, expected {len} bytes)"))
|
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L56
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:56:27
|
56 | error_handler(format!(
| ___________________________^
57 | | "unexpected content header frame received on channel {}",
58 | | channel_id
59 | | ))
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
|
|
variables can be used directly in the `format!` string:
src/channel_receiver_state.rs#L50
warning: variables can be used directly in the `format!` string
--> src/channel_receiver_state.rs:50:39
|
50 | invalid_class_hanlder(format!(
| _______________________________________^
51 | | "content header frame with class id {} instead of {} received on channel {}",
52 | | class_id, expected_class_id, channel_id
53 | | ))
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-W clippy::uninlined-format-args` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::uninlined_format_args)]`
|
|
usage of a legacy numeric method:
src/channel.rs#L632
warning: usage of a legacy numeric method
--> src/channel.rs:632:57
|
632 | self.configuration.set_frame_max(FrameSize::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
632 - self.configuration.set_frame_max(FrameSize::max_value());
632 + self.configuration.set_frame_max(FrameSize::MAX);
|
|
|
usage of a legacy numeric method:
src/channel.rs#L621
warning: usage of a legacy numeric method
--> src/channel.rs:621:59
|
621 | self.configuration.set_channel_max(ChannelId::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-W clippy::legacy-numeric-constants` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
|
621 - self.configuration.set_channel_max(ChannelId::max_value());
621 + self.configuration.set_channel_max(ChannelId::MAX);
|
|
|
using `map` over `inspect`:
src/buffer.rs#L239
warning: using `map` over `inspect`
--> src/buffer.rs:239:28
|
239 | before(s, tmp).map(|s| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `-W clippy::manual-inspect` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_inspect)]`
help: try
|
239 ~ before(s, tmp).inspect(|s| {
240 ~ s.write.rollback(end);
|
|