Skip to content

Commit c8ca79c

Browse files
gretchenfragedjc
authored andcommitted
proto: Suppress large AcceptError clippy warning
This commit uses an allow directive to suppress the following error: ``` warning: the `Err`-variant returned from this function is very large --> quinn-proto/src/endpoint.rs:525:10 | 525 | ) -> Result<(ConnectionHandle, Connection), AcceptError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 136 bytes | = help: try reducing the size of `endpoint::AcceptError`, for example by boxing large elements or replacing it with `Box<endpoint::AcceptError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err = note: `#[warn(clippy::result_large_err)]` on by default ``` Because AcceptError and all of its descendants fields are public, excepting a descendant that contains a usize, it is impossible to reduce the byte size of AcceptError without semver breakage.
1 parent 4f8a0f1 commit c8ca79c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

quinn-proto/src/endpoint.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ impl Endpoint {
516516
}
517517

518518
/// Attempt to accept this incoming connection (an error may still occur)
519+
// AcceptError cannot be made smaller without semver breakage
520+
#[allow(clippy::result_large_err)]
519521
pub fn accept(
520522
&mut self,
521523
mut incoming: Incoming,

0 commit comments

Comments
 (0)