forked from WasmEdge/hyper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(lib): resolve unused warning (hyperium#3344)
In CI, check unused_imports and dead_code Signed-off-by: Sven Pfennig <[email protected]>
- Loading branch information
Showing
21 changed files
with
199 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#[cfg(any(feature = "http2", test))] | ||
#[cfg(all(any(feature = "client", feature = "server"), feature = "http2"))] | ||
mod compat; | ||
mod rewind; | ||
|
||
#[cfg(any(feature = "http2", test))] | ||
#[cfg(all(any(feature = "client", feature = "server"), feature = "http2"))] | ||
pub(crate) use self::compat::{compat, Compat}; | ||
pub(crate) use self::rewind::Rewind; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
#[cfg(feature = "http1")] | ||
use std::convert::Infallible; | ||
pub(crate) use std::task::{Context, Poll}; | ||
|
||
/// A function to help "yield" a future, such that it is re-scheduled immediately. | ||
/// | ||
/// Useful for spin counts, so a future doesn't hog too much time. | ||
#[cfg(feature = "http1")] | ||
pub(crate) fn yield_now(cx: &mut Context<'_>) -> Poll<Infallible> { | ||
#[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))] | ||
pub(crate) fn yield_now(cx: &mut Context<'_>) -> Poll<std::convert::Infallible> { | ||
cx.waker().wake_by_ref(); | ||
Poll::Pending | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.