Skip to content

Commit

Permalink
Merge pull request #27 from ergin-org/upstream/uuid_compile_error
Browse files Browse the repository at this point in the history
fix: test requiring `uuid::Uuid: defmt::Format` trait bound
  • Loading branch information
lulf authored Jan 1, 2025
2 parents 67158ea + 4d1b2ba commit 815cb98
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ mod test {
#[cfg(feature = "uuid")]
#[test]
fn test_uuid_conversion() {
use core::str::FromStr;
let result = uuid::Uuid::from(BluetoothUuid16::new(0x1234));
let expected = "00001234-0000-0010-8000-00805f9b34fb".parse::<uuid::Uuid>().unwrap();

const BLE_UUID: BluetoothUuid16 = BluetoothUuid16::new(0x1234);
let result: uuid::Uuid = BLE_UUID.into();
let expected = uuid::Uuid::from_str("00001234-0000-0010-8000-00805f9b34fb").unwrap();
assert_eq!(result, expected);
// defmt::Format not implemented on uuid::Uuid
assert_eq!(result.into_bytes(), expected.into_bytes());
}
}

0 comments on commit 815cb98

Please sign in to comment.