Skip to content

Commit a91fda7

Browse files
authored
Merge pull request #188 from NordicSemiconductor/improvement/distinct-by-peripheral
Fixed return type of `distinctByPeripheral`
2 parents 92eeb2a + aaf777d commit a91fda7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • client-core/src/main/java/no/nordicsemi/kotlin/ble/client

client-core/src/main/java/no/nordicsemi/kotlin/ble/client/ScanResult.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ interface ScanResult<P: Peripheral<*, *>, AD: AdvertisingData> {
7070
/**
7171
* A flow which emits only one (first found) Scan Result from each discovered peripheral.
7272
*/
73-
fun <ID, P: Peripheral<ID, *>> Flow<ScanResult<P, *>>.distinctByPeripheral(): Flow<ScanResult<P, *>> = flow {
73+
fun <ID, P: Peripheral<ID, *>, SR: ScanResult<P, *>> Flow<SR>.distinctByPeripheral(): Flow<SR> = flow {
7474
val peripherals = mutableSetOf<ID>()
7575
collect { result ->
7676
if (peripherals.add(result.peripheral.identifier)) {

0 commit comments

Comments
 (0)