Skip to content

Commit 5899714

Browse files
Derive Hash for BleDevice (#85)
* Handle EOF when DuplexStream is closed, avoiding a panic. Fixes #75 * Additional protection from panics on invalid input buffer lengths. * Derive Hash for BleDevice to allow it to be added to HashSets and HashMaps * Revert "Derive Hash for BleDevice to allow it to be added to HashSets and HashMaps" This reverts commit a21b585. * Derive Hash for BleDevice to allow it to be added to HashSets and HashMaps
1 parent 87bf24b commit 5899714

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/connections/ble_handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl Display for BleId {
102102
}
103103

104104
/// A Meshtastic device discovered via Bluetooth LE.
105-
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
105+
#[derive(Clone, PartialEq, Eq, Hash, Debug, Serialize, Deserialize)]
106106
pub struct BleDevice {
107107
/// The broadcast name of the device.
108108
pub name: Option<String>,

0 commit comments

Comments
 (0)