Skip to content

Commit

Permalink
Use core::error::Error for no-std (#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
antimora authored Oct 30, 2024
1 parent ff371de commit 5989cf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions crates/burn-core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ impl core::fmt::Display for ConfigError {
}
}

// TODO: Move from std to core after Error is core (see https://github.com/rust-lang/rust/issues/103765)
#[cfg(feature = "std")]
impl std::error::Error for ConfigError {}
impl core::error::Error for ConfigError {}

/// Configuration trait.
pub trait Config: serde::Serialize + serde::de::DeserializeOwned {
Expand Down
4 changes: 1 addition & 3 deletions crates/burn-core/src/record/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ impl core::fmt::Display for RecorderError {
}
}

// TODO: Move from std to core after Error is core (see https://github.com/rust-lang/rust/issues/103765)
#[cfg(feature = "std")]
impl std::error::Error for RecorderError {}
impl core::error::Error for RecorderError {}

pub(crate) fn bin_config() -> bincode::config::Configuration {
bincode::config::standard()
Expand Down

0 comments on commit 5989cf3

Please sign in to comment.