Skip to content

Commit e9d5cf2

Browse files
authored
Use error from core (#22)
1 parent 4188c0f commit e9d5cf2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ fn midi_to_bytes(message: wmidi::MidiMessage<'_>) -> Vec<u8> {
4545

4646
## Changelog
4747

48+
### Unreleased
49+
50+
* Use `error` from `core`.
51+
4852
### 4.0.0
4953

5054
* New ControlFunction type which simply wraps a U7.

src/error.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1+
use core::error;
12
use core::fmt;
2-
#[cfg(feature = "std")]
3-
use std::error;
43

54
/// Midi decoding errors.
65
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
@@ -40,7 +39,6 @@ pub enum FromBytesError {
4039
U14OutOfRange,
4140
}
4241

43-
#[cfg(feature = "std")]
4442
impl error::Error for FromBytesError {}
4543

4644
impl fmt::Display for FromBytesError {
@@ -56,7 +54,6 @@ pub enum ToSliceError {
5654
BufferTooSmall,
5755
}
5856

59-
#[cfg(feature = "std")]
6057
impl error::Error for ToSliceError {}
6158

6259
impl fmt::Display for ToSliceError {

0 commit comments

Comments
 (0)