Accepting empty deviceName, when requesting a BluetoothDevice.

This commit is contained in:
zakorgyula 2016-10-07 12:42:40 +02:00
parent 2b4829b89a
commit 4ed461c6e5
6 changed files with 10 additions and 22 deletions

View file

@ -106,8 +106,8 @@ fn matches_filter(device: &BluetoothDevice, filter: &BluetoothScanfilter) -> boo
}
// Step 1.
if !filter.get_name().is_empty() {
if device.get_name().ok() != Some(filter.get_name().to_string()) {
if let Some(name) = filter.get_name() {
if device.get_name().ok() != Some(name.to_string()) {
return false;
}
}