Skip to content

http bugfix: address memory leak in after_send caused by std::mem::fo… #535

http bugfix: address memory leak in after_send caused by std::mem::fo…

http bugfix: address memory leak in after_send caused by std::mem::fo… #535

Triggered via push October 24, 2023 18:16
Status Success
Total duration 2m 5s
Artifacts

docs.yml

on: push
build rustdocs and put them on github pages
1m 56s
build rustdocs and put them on github pages
Fit to window
Zoom out
Zoom in

Annotations

23 warnings
build rustdocs and put them on github pages
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, peaceiris/actions-gh-pages@364c31d33bb99327c77b3a5438a83a357a6729ad. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build rustdocs and put them on github pages
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/
build rustdocs and put them on github pages
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/
build rustdocs and put them on github pages
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/
build rustdocs and put them on github pages
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/
use of `default` to create a unit struct: sse/src/lib.rs#L94
warning: use of `default` to create a unit struct --> sse/src/lib.rs:94:31 | 94 | event: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: proxy/src/lib.rs#L209
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> proxy/src/lib.rs:209:29 | 209 | .extend(std::mem::take(client_conn.response_headers_mut()).into_iter()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `std::mem::take(client_conn.response_headers_mut())` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/cd674d61790607dfb6faa9d754bd3adfa13aea7c/library/core/src/iter/traits/collect.rs:372:18 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
the borrowed expression implements the required traits: client/src/conn.rs#L451
warning: the borrowed expression implements the required traits --> client/src/conn.rs:451:13 | 451 | &mut self.response_body_state, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.response_body_state` | = 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
docs for function which may panic missing `# Panics` section: trillium/src/conn.rs#L537
warning: docs for function which may panic missing `# Panics` section --> trillium/src/conn.rs:537:5 | 537 | pub fn into_inner<T: Transport>(self) -> trillium_http::Conn<T> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first possible panic found here --> trillium/src/conn.rs:539:14 | 539 | *t.downcast() | ______________^ 540 | | .expect("attempted to downcast to the wrong transport type") | |____________________________________________________________________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
item in documentation is missing backticks: trillium/src/conn.rs#L281
warning: item in documentation is missing backticks --> trillium/src/conn.rs:281:16 | 281 | Returns a [ReceivedBody] that references this `Conn`. The `Conn` | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown note: the lint level is defined here --> trillium/src/lib.rs:10:23 | 10 | #![warn(missing_docs, clippy::pedantic, clippy::nursery, clippy::cargo)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::doc_markdown)]` implied by `#[warn(clippy::pedantic)]` help: try | 281 | Returns a [`ReceivedBody`] that references this `Conn`. The `Conn` | ~~~~~~~~~~~~~~
item in documentation is missing backticks: http/src/transport/boxed_transport.rs#L54
warning: item in documentation is missing backticks --> http/src/transport/boxed_transport.rs:54:18 | 54 | Create a new BoxedTransport from some Transport. | ^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown help: try | 54 | Create a new `BoxedTransport` from some Transport. | ~~~~~~~~~~~~~~~~
matching over `()` is more explicit: http/src/headers/header_name.rs#L93
warning: matching over `()` is more explicit --> http/src/headers/header_name.rs:93:21 | 93 | Err(_) => UnknownHeader(UnknownHeaderName(SmartCow::Owned(SmartString::from(s)))), | ^ help: use `()` instead of `_`: `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
docs for function which may panic missing `# Panics` section: http/src/state_set.rs#L75
warning: docs for function which may panic missing `# Panics` section --> http/src/state_set.rs:75:5 | 75 | / pub fn get_or_insert_with<F, T>(&mut self, default: F) -> &mut T 76 | | where 77 | | F: FnOnce() -> T, 78 | | T: Send + Sync + 'static, | |_________________________________^ | note: first possible panic found here --> http/src/state_set.rs:80:9 | 80 | / self.0 81 | | .entry(TypeId::of::<T>()) 82 | | .or_insert_with(|| Box::new(default())) 83 | | .downcast_mut() 84 | | .expect("StateSet maintains the invariant the value associated with a given TypeId is always the type associated with that TypeId.") | |________________________________________________________________________________________________________________________________________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
docs for function which may panic missing `# Panics` section: http/src/state_set.rs#L65
warning: docs for function which may panic missing `# Panics` section --> http/src/state_set.rs:65:5 | 65 | pub fn get_or_insert<T: Send + Sync + 'static>(&mut self, default: T) -> &mut T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first possible panic found here --> http/src/state_set.rs:66:9 | 66 | / self.0 67 | | .entry(TypeId::of::<T>()) 68 | | .or_insert_with(|| Box::new(default)) 69 | | .downcast_mut() 70 | | .expect("StateSet maintains the invariant the value associated with a given TypeId is always the type associated with that TypeId.") | |________________________________________________________________________________________________________________________________________________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc = note: `#[warn(clippy::missing_panics_doc)]` implied by `#[warn(clippy::pedantic)]`
manual `Debug` impl does not include all fields: http/src/upgrade.rs#L99
warning: manual `Debug` impl does not include all fields --> http/src/upgrade.rs:99:1 | 99 | / impl<Transport> Debug for Upgrade<Transport> { 100 | | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { 101 | | f.debug_struct(&format!("Upgrade<{}>", std::any::type_name::<Transport>())) 102 | | .field("request_headers", &self.request_headers) ... | 110 | | } 111 | | } | |_^ | note: this field is unused --> http/src/upgrade.rs:32:5 | 32 | pub state: StateSet, | ^^^^^^^^^^^^^^^^^^^ note: this field is unused --> http/src/upgrade.rs:35:5 | 35 | pub transport: Transport, | ^^^^^^^^^^^^^^^^^^^^^^^^ note: this field is unused --> http/src/upgrade.rs:43:5 | 43 | pub stopper: Stopper, | ^^^^^^^^^^^^^^^^^^^^ = help: consider including all fields in this `Debug` impl = help: consider calling `.finish_non_exhaustive()` if you intend to ignore fields = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_fields_in_debug = note: `#[warn(clippy::missing_fields_in_debug)]` implied by `#[warn(clippy::pedantic)]`
matching over `()` is more explicit: http/src/synthetic.rs#L93
warning: matching over `()` is more explicit --> http/src/synthetic.rs:93:13 | 93 | fn from(_: ()) -> Self { | ^ help: use `()` instead of `_`: `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns = note: `#[warn(clippy::ignored_unit_patterns)]` implied by `#[warn(clippy::pedantic)]`
this function's return value is unnecessary: http/src/conn.rs#L798
warning: this function's return value is unnecessary --> http/src/conn.rs:798:5 | 798 | / fn write_headers(&mut self, output_buffer: &mut Vec<u8>) -> Result<()> { 799 | | let status = self.status().unwrap_or(Status::NotFound); 800 | | let first_line = format!( 801 | | "{} {} {}\r\n", ... | 824 | | Ok(()) 825 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps = note: `#[warn(clippy::unnecessary_wraps)]` implied by `#[warn(clippy::pedantic)]` help: remove the return type... | 798 | fn write_headers(&mut self, output_buffer: &mut Vec<u8>) -> Result<()> { | ~~~~~~~~~~ help: ...and then remove returned values | 824 - Ok(()) 824 + |
item in documentation is missing backticks: http/src/conn.rs#L639
warning: item in documentation is missing backticks --> http/src/conn.rs:639:22 | 639 | processing in an after_send hook, please open an issue. This hook | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown help: try | 639 | processing in an `after_send` hook, please open an issue. This hook | ~~~~~~~~~~~~
item in documentation is missing backticks: http/src/conn.rs#L437
warning: item in documentation is missing backticks --> http/src/conn.rs:437:5 | 437 | ReceivedBody provides an interface to read body content | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown help: try | 437 | `ReceivedBody` provides an interface to read body content | ~~~~~~~~~~~~~~
item in documentation is missing backticks: http/src/conn.rs#L435
warning: item in documentation is missing backticks --> http/src/conn.rs:435:16 | 435 | returns a [ReceivedBody] that references this conn. the conn | ^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown help: try | 435 | returns a [`ReceivedBody`] that references this conn. the conn | ~~~~~~~~~~~~~~
item in documentation is missing backticks: http/src/conn.rs#L419
warning: item in documentation is missing backticks --> http/src/conn.rs:419:18 | 419 | returns the [encoding_rs::Encoding] for this response, as | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown help: try | 419 | returns the [`encoding_rs::Encoding`] for this response, as | ~~~~~~~~~~~~~~~~~~~~~~~
item in documentation is missing backticks: http/src/conn.rs#L403
warning: item in documentation is missing backticks --> http/src/conn.rs:403:18 | 403 | returns the [encoding_rs::Encoding] for this request, as | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown note: the lint level is defined here --> http/src/lib.rs:10:23 | 10 | #![warn(missing_docs, clippy::pedantic, clippy::perf, clippy::cargo)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::doc_markdown)]` implied by `#[warn(clippy::pedantic)]` help: try | 403 | returns the [`encoding_rs::Encoding`] for this request, as | ~~~~~~~~~~~~~~~~~~~~~~~
the borrowed expression implements the required traits: http/src/conn.rs#L396
warning: the borrowed expression implements the required traits --> http/src/conn.rs:396:13 | 396 | &mut self.request_body_state, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.request_body_state` | = 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