Skip to content

Add proper delivery handling #335

Add proper delivery handling

Add proper delivery handling #335

Triggered via push March 4, 2024 17:55
Status Success
Total duration 10m 51s
Artifacts

windows.yml

on: push
Matrix: build_and_test
Fit to window
Zoom out
Zoom in

Annotations

62 warnings
manual implementation of `Option::map`: src/delivery.rs#L162
warning: manual implementation of `Option::map` --> src/delivery.rs:162:16 | 162 | } else if let Some(ref err) = inner.error { | ________________^ 163 | | Some(Err(err.clone())) 164 | | } else { 165 | | None 166 | | } | |_________^ help: try: `{ inner.error.as_ref().map(|err| Err(err.clone())) }` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map = note: `#[warn(clippy::manual_map)]` on by default
this `else { if .. }` block can be collapsed: src/session.rs#L1090
warning: this `else { if .. }` block can be collapsed --> src/session.rs:1090:16 | 1090 | } else { | ________________^ 1091 | | if let Some(delivery) = self.unsettled_deliveries.get_mut(&from) { 1092 | | delivery.handle_disposition(disp); 1093 | | } 1094 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 1090 ~ } else if let Some(delivery) = self.unsettled_deliveries.get_mut(&from) { 1091 + delivery.handle_disposition(disp); 1092 + } |
bound is defined in more than one place: src/router.rs#L33
warning: bound is defined in more than one place --> src/router.rs:33:26 | 33 | pub fn service<T, F, U: 'static>(mut self, address: T, service: F) -> Self | ^ ... 37 | U: ServiceFactory<Transfer, Link<S>, Response = Outcome>, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` on by default
this `else { if .. }` block can be collapsed: src/delivery.rs#L272
warning: this `else { if .. }` block can be collapsed --> src/delivery.rs:272:16 | 272 | } else { | ________________^ 273 | | if inner 274 | | .max_message_size 275 | | .map(|l| self.data.len() > l as usize) ... | 291 | | } 292 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 272 ~ } else if inner 273 + .max_message_size 274 + .map(|l| self.data.len() > l as usize) 275 + .unwrap_or_default() 276 + { 277 + Err(AmqpProtocolError::BodyTooLarge) 278 + } else { 279 + let id = self.sender.get_mut().send(self.data, self.tag).await?; 280 + 281 + Ok(Delivery { 282 + id, 283 + session: self.sender.get_ref().session.clone(), 284 + flags: StdCell::new(if self.settled { 285 + Flags::SENDER | Flags::LOCAL_SETTLED 286 + } else { 287 + Flags::SENDER 288 + }), 289 + }) 290 + } |
the item `Uuid` is imported redundantly: codec/src/protocol/definitions.rs#L8
warning: the item `Uuid` is imported redundantly --> codec/src/protocol/definitions.rs:8:5 | 2 | use super::*; | -------- the item `Uuid` is already imported here ... 8 | use uuid::Uuid; | ^^^^^^^^^^
the item `BytesMut` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `BytesMut` is imported redundantly --> codec/src/protocol/definitions.rs:6:45 | 2 | use super::*; | -------- the item `BytesMut` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^^^^
the item `Bytes` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `Bytes` is imported redundantly --> codec/src/protocol/definitions.rs:6:38 | 2 | use super::*; | -------- the item `Bytes` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^
the item `ByteString` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `ByteString` is imported redundantly --> codec/src/protocol/definitions.rs:6:26 | 2 | use super::*; | -------- the item `ByteString` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^^^^^^
the item `BufMut` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `BufMut` is imported redundantly --> codec/src/protocol/definitions.rs:6:18 | 2 | use super::*; | -------- the item `BufMut` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^^
the item `AmqpParseError` is imported redundantly: codec/src/protocol/definitions.rs#L4
warning: the item `AmqpParseError` is imported redundantly --> codec/src/protocol/definitions.rs:4:5 | 2 | use super::*; | -------- the item `AmqpParseError` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; 4 | use crate::error::AmqpParseError; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `Encode` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `Encode` is imported redundantly --> codec/src/protocol/definitions.rs:3:91 | 2 | use super::*; | -------- the item `Encode` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^^^
the item `DecodeFormatted` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `DecodeFormatted` is imported redundantly --> codec/src/protocol/definitions.rs:3:74 | 2 | use super::*; | -------- the item `DecodeFormatted` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^^^^^^^^^^^^
the item `Decode` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `Decode` is imported redundantly --> codec/src/protocol/definitions.rs:3:66 | 2 | use super::*; | -------- the item `Decode` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^^^
the item `codec` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `codec` is imported redundantly --> codec/src/protocol/definitions.rs:3:20 | 2 | use super::*; | -------- the item `codec` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^
the item `Sized` is imported redundantly: codec/src/codec/mod.rs#L2
warning: the item `Sized` is imported redundantly --> codec/src/codec/mod.rs:2:5 | 2 | use std::marker::Sized; | ^^^^^^^^^^^^^^^^^^ --> /rustc/516b6162a2ea8e66678c09e8243ebd83e4b8eeea/library/std/src/prelude/mod.rs:115:13 | = note: the item `Sized` is already defined here | = note: `#[warn(unused_imports)]` on by default
manual implementation of `Option::map`: src/delivery.rs#L162
warning: manual implementation of `Option::map` --> src/delivery.rs:162:16 | 162 | } else if let Some(ref err) = inner.error { | ________________^ 163 | | Some(Err(err.clone())) 164 | | } else { 165 | | None 166 | | } | |_________^ help: try: `{ inner.error.as_ref().map(|err| Err(err.clone())) }` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map = note: `#[warn(clippy::manual_map)]` on by default
this `else { if .. }` block can be collapsed: src/session.rs#L1090
warning: this `else { if .. }` block can be collapsed --> src/session.rs:1090:16 | 1090 | } else { | ________________^ 1091 | | if let Some(delivery) = self.unsettled_deliveries.get_mut(&from) { 1092 | | delivery.handle_disposition(disp); 1093 | | } 1094 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 1090 ~ } else if let Some(delivery) = self.unsettled_deliveries.get_mut(&from) { 1091 + delivery.handle_disposition(disp); 1092 + } |
bound is defined in more than one place: src/router.rs#L33
warning: bound is defined in more than one place --> src/router.rs:33:26 | 33 | pub fn service<T, F, U: 'static>(mut self, address: T, service: F) -> Self | ^ ... 37 | U: ServiceFactory<Transfer, Link<S>, Response = Outcome>, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` on by default
this `else { if .. }` block can be collapsed: src/delivery.rs#L272
warning: this `else { if .. }` block can be collapsed --> src/delivery.rs:272:16 | 272 | } else { | ________________^ 273 | | if inner 274 | | .max_message_size 275 | | .map(|l| self.data.len() > l as usize) ... | 291 | | } 292 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 272 ~ } else if inner 273 + .max_message_size 274 + .map(|l| self.data.len() > l as usize) 275 + .unwrap_or_default() 276 + { 277 + Err(AmqpProtocolError::BodyTooLarge) 278 + } else { 279 + let id = self.sender.get_mut().send(self.data, self.tag).await?; 280 + 281 + Ok(Delivery { 282 + id, 283 + session: self.sender.get_ref().session.clone(), 284 + flags: StdCell::new(if self.settled { 285 + Flags::SENDER | Flags::LOCAL_SETTLED 286 + } else { 287 + Flags::SENDER 288 + }), 289 + }) 290 + } |
the item `Uuid` is imported redundantly: codec/src/protocol/definitions.rs#L8
warning: the item `Uuid` is imported redundantly --> codec/src/protocol/definitions.rs:8:5 | 2 | use super::*; | -------- the item `Uuid` is already imported here ... 8 | use uuid::Uuid; | ^^^^^^^^^^
the item `BytesMut` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `BytesMut` is imported redundantly --> codec/src/protocol/definitions.rs:6:45 | 2 | use super::*; | -------- the item `BytesMut` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^^^^
the item `Bytes` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `Bytes` is imported redundantly --> codec/src/protocol/definitions.rs:6:38 | 2 | use super::*; | -------- the item `Bytes` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^
the item `ByteString` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `ByteString` is imported redundantly --> codec/src/protocol/definitions.rs:6:26 | 2 | use super::*; | -------- the item `ByteString` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^^^^^^
the item `BufMut` is imported redundantly: codec/src/protocol/definitions.rs#L6
warning: the item `BufMut` is imported redundantly --> codec/src/protocol/definitions.rs:6:18 | 2 | use super::*; | -------- the item `BufMut` is already imported here ... 6 | use ntex_bytes::{BufMut, ByteString, Bytes, BytesMut}; | ^^^^^^
the item `AmqpParseError` is imported redundantly: codec/src/protocol/definitions.rs#L4
warning: the item `AmqpParseError` is imported redundantly --> codec/src/protocol/definitions.rs:4:5 | 2 | use super::*; | -------- the item `AmqpParseError` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; 4 | use crate::error::AmqpParseError; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the item `Encode` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `Encode` is imported redundantly --> codec/src/protocol/definitions.rs:3:91 | 2 | use super::*; | -------- the item `Encode` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^^^
the item `DecodeFormatted` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `DecodeFormatted` is imported redundantly --> codec/src/protocol/definitions.rs:3:74 | 2 | use super::*; | -------- the item `DecodeFormatted` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^^^^^^^^^^^^
the item `Decode` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `Decode` is imported redundantly --> codec/src/protocol/definitions.rs:3:66 | 2 | use super::*; | -------- the item `Decode` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^^^
the item `codec` is imported redundantly: codec/src/protocol/definitions.rs#L3
warning: the item `codec` is imported redundantly --> codec/src/protocol/definitions.rs:3:20 | 2 | use super::*; | -------- the item `codec` is already imported here 3 | use crate::codec::{self, decode_format_code, decode_list_header, Decode, DecodeFormatted, Encode}; | ^^^^
the item `Sized` is imported redundantly: codec/src/codec/mod.rs#L2
warning: the item `Sized` is imported redundantly --> codec/src/codec/mod.rs:2:5 | 2 | use std::marker::Sized; | ^^^^^^^^^^^^^^^^^^ --> /rustc/516b6162a2ea8e66678c09e8243ebd83e4b8eeea/library/std/src/prelude/mod.rs:115:13 | = note: the item `Sized` is already defined here | = note: `#[warn(unused_imports)]` on by default
nightly - x86_64-pc-windows-msvc
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1, actions-rs/cargo@v1, actions/cache@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
nightly - x86_64-pc-windows-msvc
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
nightly - x86_64-pc-windows-msvc
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/
nightly - x86_64-pc-windows-msvc
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/
nightly - x86_64-pc-windows-msvc
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/
nightly - x86_64-pc-windows-msvc
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/
nightly - x86_64-pc-windows-msvc: codec/src/codec/mod.rs#L2
the item `Sized` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L3
the item `codec` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L3
the item `Decode` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L3
the item `DecodeFormatted` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L3
the item `Encode` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L4
the item `AmqpParseError` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L6
the item `BufMut` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L6
the item `ByteString` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L6
the item `Bytes` is imported redundantly
nightly - x86_64-pc-windows-msvc: codec/src/protocol/definitions.rs#L6
the item `BytesMut` is imported redundantly
stable - x86_64-pc-windows-msvc
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/toolchain@v1, actions-rs/cargo@v1, actions/cache@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
stable - x86_64-pc-windows-msvc
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L680
use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L680
use of deprecated method `chrono::Date::<Tz>::and_hms_milli`: Use and_hms_milli_opt() instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L683
use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L683
use of deprecated method `chrono::Date::<Tz>::and_hms_milli`: Use and_hms_milli_opt() instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L693
use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L693
use of deprecated method `chrono::Date::<Tz>::and_hms_milli`: Use and_hms_milli_opt() instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L696
use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L696
use of deprecated method `chrono::Date::<Tz>::and_hms_milli`: Use and_hms_milli_opt() instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L752
use of deprecated method `chrono::TimeZone::ymd`: use `with_ymd_and_hms()` instead
stable - x86_64-pc-windows-msvc: codec/src/codec/decode.rs#L752
use of deprecated method `chrono::Date::<Tz>::and_hms_milli`: Use and_hms_milli_opt() instead
stable - x86_64-pc-windows-msvc
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/
stable - x86_64-pc-windows-msvc
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/
stable - x86_64-pc-windows-msvc
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/
stable - x86_64-pc-windows-msvc
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/