Skip to content

Commit

Permalink
Removed From<CableNumber> for U4 implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcebox committed Dec 21, 2024
1 parent 77fb5c1 commit abf5166
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ This release focuses on:
- `UsbMidiEventPacket::message` field, use `Message::try_from(&UsbMidiEventPacket)` instead.
- `UsbMidiEventPacket::from_midi` function, use `Message::into_packet` instead.
- `CodeIndexNumber::find_from_message` function, use `Message::code_index_number` instead.
- `From<CableNumber> for U4` implementation.

## [0.3.0] - 2024-05-27

Expand Down
7 changes: 0 additions & 7 deletions src/packet/cable_number.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Enum representing the cable number of a packet.
use crate::data::u4::U4;
use crate::packet::MidiPacketParsingError;

/// The Cable Number (CN) is a value ranging from 0x0 to 0xF
Expand Down Expand Up @@ -61,12 +60,6 @@ impl From<CableNumber> for u8 {
}
}

impl From<CableNumber> for U4 {
fn from(value: CableNumber) -> U4 {
U4::from_overflowing_u8(u8::from(value))
}
}

#[cfg(test)]
mod tests {

Expand Down

0 comments on commit abf5166

Please sign in to comment.