Skip to content
Merged
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
2 changes: 1 addition & 1 deletion benchmarks/benches/dataset.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::error::Error;
use criterion::{criterion_group, criterion_main, Criterion};
use prost::Message;
use std::error::Error;

pub mod benchmarks {
include!(concat!(env!("OUT_DIR"), "/benchmarks.rs"));
Expand Down
3 changes: 1 addition & 2 deletions prost-types/src/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ impl fmt::Display for DurationError {
}
}

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

impl FromStr for Duration {
type Err = DurationError;
Expand Down
3 changes: 1 addition & 2 deletions prost-types/src/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ impl fmt::Display for TimestampError {
}
}

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

#[cfg(feature = "std")]
impl TryFrom<Timestamp> for std::time::SystemTime {
Expand Down
9 changes: 3 additions & 6 deletions prost/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ impl fmt::Display for DecodeErrorKind {
}
}

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

#[cfg(feature = "std")]
impl From<DecodeError> for std::io::Error {
Expand Down Expand Up @@ -196,8 +195,7 @@ impl fmt::Display for EncodeError {
}
}

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

#[cfg(feature = "std")]
impl From<EncodeError> for std::io::Error {
Expand All @@ -220,8 +218,7 @@ impl fmt::Display for UnknownEnumValue {
}
}

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

#[cfg(test)]
mod test {
Expand Down
Loading