diff --git a/README.md b/README.md index 2a1698f..77c815c 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ fn midi_to_bytes(message: wmidi::MidiMessage<'_>) -> Vec { ## Changelog +### Unreleased + +* Use `error` from `core`. + ### 4.0.0 * New ControlFunction type which simply wraps a U7. diff --git a/src/error.rs b/src/error.rs index 50704da..2cd5ef8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,6 +1,5 @@ +use core::error; use core::fmt; -#[cfg(feature = "std")] -use std::error; /// Midi decoding errors. #[derive(Copy, Clone, Debug, Eq, PartialEq)] @@ -40,7 +39,6 @@ pub enum FromBytesError { U14OutOfRange, } -#[cfg(feature = "std")] impl error::Error for FromBytesError {} impl fmt::Display for FromBytesError { @@ -56,7 +54,6 @@ pub enum ToSliceError { BufferTooSmall, } -#[cfg(feature = "std")] impl error::Error for ToSliceError {} impl fmt::Display for ToSliceError {