Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: no-std error::Error info #2910

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions futures-util/src/abortable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ impl fmt::Display for Aborted {
}
}

#[cfg(feature = "std")]
impl std::error::Error for Aborted {}
impl core::error::Error for Aborted {}

impl<T> Abortable<T> {
fn try_poll<I>(
Expand Down
3 changes: 1 addition & 2 deletions futures-util/src/io/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,4 @@ impl<T> fmt::Display for ReuniteError<T> {
}
}

#[cfg(feature = "std")]
impl<T: core::any::Any> std::error::Error for ReuniteError<T> {}
impl<T: core::any::Any> core::error::Error for ReuniteError<T> {}
3 changes: 1 addition & 2 deletions futures-util/src/lock/bilock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ impl<T> fmt::Display for ReuniteError<T> {
}
}

#[cfg(feature = "std")]
impl<T: core::any::Any> std::error::Error for ReuniteError<T> {}
impl<T: core::any::Any> core::error::Error for ReuniteError<T> {}

/// Returned RAII guard from the `poll_lock` method.
///
Expand Down
3 changes: 1 addition & 2 deletions futures-util/src/stream/stream/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ impl<T, Item> fmt::Display for ReuniteError<T, Item> {
}
}

#[cfg(feature = "std")]
impl<T: core::any::Any, Item> std::error::Error for ReuniteError<T, Item> {}
impl<T: core::any::Any, Item> core::error::Error for ReuniteError<T, Item> {}

#[cfg(test)]
mod tests {
Expand Down
3 changes: 1 addition & 2 deletions futures-util/src/stream/try_stream/try_chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,4 @@ impl<T, E: fmt::Display> fmt::Display for TryChunksError<T, E> {
}
}

#[cfg(feature = "std")]
impl<T, E: fmt::Debug + fmt::Display> std::error::Error for TryChunksError<T, E> {}
impl<T, E: fmt::Debug + fmt::Display> core::error::Error for TryChunksError<T, E> {}
3 changes: 1 addition & 2 deletions futures-util/src/stream/try_stream/try_ready_chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,4 @@ impl<T, E: fmt::Display> fmt::Display for TryReadyChunksError<T, E> {
}
}

#[cfg(feature = "std")]
impl<T, E: fmt::Debug + fmt::Display> std::error::Error for TryReadyChunksError<T, E> {}
impl<T, E: fmt::Debug + fmt::Display> core::error::Error for TryReadyChunksError<T, E> {}
Loading