From fa428a59d96e093842ea575680f6705d482ac09e Mon Sep 17 00:00:00 2001 From: "@brodycj - C. Jonathan Brody" Date: Tue, 7 Jan 2025 00:05:26 -0500 Subject: [PATCH] util: no-std error::Error info --- futures-util/src/abortable.rs | 3 +-- futures-util/src/io/split.rs | 3 +-- futures-util/src/lock/bilock.rs | 3 +-- futures-util/src/stream/stream/split.rs | 3 +-- futures-util/src/stream/try_stream/try_chunks.rs | 3 +-- futures-util/src/stream/try_stream/try_ready_chunks.rs | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/futures-util/src/abortable.rs b/futures-util/src/abortable.rs index e1e79e371..4ac51d345 100644 --- a/futures-util/src/abortable.rs +++ b/futures-util/src/abortable.rs @@ -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 Abortable { fn try_poll( diff --git a/futures-util/src/io/split.rs b/futures-util/src/io/split.rs index 5b6bc1893..79e0a4d00 100644 --- a/futures-util/src/io/split.rs +++ b/futures-util/src/io/split.rs @@ -125,5 +125,4 @@ impl fmt::Display for ReuniteError { } } -#[cfg(feature = "std")] -impl std::error::Error for ReuniteError {} +impl core::error::Error for ReuniteError {} diff --git a/futures-util/src/lock/bilock.rs b/futures-util/src/lock/bilock.rs index 5970ca2b6..40cba4824 100644 --- a/futures-util/src/lock/bilock.rs +++ b/futures-util/src/lock/bilock.rs @@ -220,8 +220,7 @@ impl fmt::Display for ReuniteError { } } -#[cfg(feature = "std")] -impl std::error::Error for ReuniteError {} +impl core::error::Error for ReuniteError {} /// Returned RAII guard from the `poll_lock` method. /// diff --git a/futures-util/src/stream/stream/split.rs b/futures-util/src/stream/stream/split.rs index e192f8a92..17bbc015a 100644 --- a/futures-util/src/stream/stream/split.rs +++ b/futures-util/src/stream/stream/split.rs @@ -154,8 +154,7 @@ impl fmt::Display for ReuniteError { } } -#[cfg(feature = "std")] -impl std::error::Error for ReuniteError {} +impl core::error::Error for ReuniteError {} #[cfg(test)] mod tests { diff --git a/futures-util/src/stream/try_stream/try_chunks.rs b/futures-util/src/stream/try_stream/try_chunks.rs index ec53f4bd1..dfd1e3852 100644 --- a/futures-util/src/stream/try_stream/try_chunks.rs +++ b/futures-util/src/stream/try_stream/try_chunks.rs @@ -128,5 +128,4 @@ impl fmt::Display for TryChunksError { } } -#[cfg(feature = "std")] -impl std::error::Error for TryChunksError {} +impl core::error::Error for TryChunksError {} diff --git a/futures-util/src/stream/try_stream/try_ready_chunks.rs b/futures-util/src/stream/try_stream/try_ready_chunks.rs index 8b1470ea2..44f25e784 100644 --- a/futures-util/src/stream/try_stream/try_ready_chunks.rs +++ b/futures-util/src/stream/try_stream/try_ready_chunks.rs @@ -122,5 +122,4 @@ impl fmt::Display for TryReadyChunksError { } } -#[cfg(feature = "std")] -impl std::error::Error for TryReadyChunksError {} +impl core::error::Error for TryReadyChunksError {}