Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Fix some unconstrained type parameters being inferred to !
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Apr 9, 2018
1 parent 1069d67 commit fecacb7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions blurmac/src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ pub mod ns {

pub fn mutabledictionary_removeobjectforkey(nsmutdict: *mut Object, key: *mut Object) {
unsafe {
msg_send![nsmutdict, removeObjectForKey:key];
let () = msg_send![nsmutdict, removeObjectForKey:key];
}
}

pub fn mutabledictionary_setobject_forkey(nsmutdict: *mut Object, object: *mut Object, key: *mut Object) {
unsafe {
msg_send![nsmutdict, setObject:object forKey:key];
let () = msg_send![nsmutdict, setObject:object forKey:key];
}
}

Expand Down Expand Up @@ -248,25 +248,25 @@ pub mod cb {

pub fn centralmanager_scanforperipherals_options(cbcentralmanager: *mut Object, options: *mut Object /* NSDictionary<NSString*,id> */) {
unsafe {
msg_send![cbcentralmanager, scanForPeripheralsWithServices:nil options:options];
let () = msg_send![cbcentralmanager, scanForPeripheralsWithServices:nil options:options];
}
}

pub fn centralmanager_stopscan(cbcentralmanager: *mut Object) {
unsafe {
msg_send![cbcentralmanager, stopScan];
let () = msg_send![cbcentralmanager, stopScan];
}
}

pub fn centralmanager_connectperipheral(cbcentralmanager: *mut Object, peripheral: *mut Object /* CBPeripheral* */) {
unsafe {
msg_send![cbcentralmanager, connectPeripheral:peripheral options:nil];
let () = msg_send![cbcentralmanager, connectPeripheral:peripheral options:nil];
}
}

pub fn centralmanager_cancelperipheralconnection(cbcentralmanager: *mut Object, peripheral: *mut Object /* CBPeripheral* */) {
unsafe {
msg_send![cbcentralmanager, cancelPeripheralConnection:peripheral];
let () = msg_send![cbcentralmanager, cancelPeripheralConnection:peripheral];
}
}

Expand Down Expand Up @@ -297,19 +297,19 @@ pub mod cb {

pub fn peripheral_setdelegate(cbperipheral: *mut Object, delegate: *mut Object /* CBPeripheralDelegate* */) {
unsafe {
msg_send![cbperipheral, setDelegate:delegate];
let () = msg_send![cbperipheral, setDelegate:delegate];
}
}

pub fn peripheral_discoverservices(cbperipheral: *mut Object) {
unsafe {
msg_send![cbperipheral, discoverServices:nil];
let () = msg_send![cbperipheral, discoverServices:nil];
}
}

pub fn peripheral_discoverincludedservicesforservice(cbperipheral: *mut Object, service: *mut Object /* CBService* */) {
unsafe {
msg_send![cbperipheral, discoverIncludedServices:nil forService:service];
let () = msg_send![cbperipheral, discoverIncludedServices:nil forService:service];
}
}

Expand All @@ -322,31 +322,31 @@ pub mod cb {

pub fn peripheral_discovercharacteristicsforservice(cbperipheral: *mut Object, service: *mut Object /* CBService* */) {
unsafe {
msg_send![cbperipheral, discoverCharacteristics:nil forService:service];
let () = msg_send![cbperipheral, discoverCharacteristics:nil forService:service];
}
}

pub fn peripheral_readvalueforcharacteristic(cbperipheral: *mut Object, characteristic: *mut Object /* CBCharacteristic* */) {
unsafe {
msg_send![cbperipheral, readValueForCharacteristic:characteristic];
let () = msg_send![cbperipheral, readValueForCharacteristic:characteristic];
}
}

pub fn peripheral_writevalue_forcharacteristic(cbperipheral: *mut Object, value: *mut Object /* NSData* */, characteristic: *mut Object /* CBCharacteristic* */) {
unsafe {
msg_send![cbperipheral, writeValue:value forCharacteristic:characteristic type:0]; // CBCharacteristicWriteWithResponse from CBPeripheral.h
let () = msg_send![cbperipheral, writeValue:value forCharacteristic:characteristic type:0]; // CBCharacteristicWriteWithResponse from CBPeripheral.h
}
}

pub fn peripheral_setnotifyvalue_forcharacteristic(cbperipheral: *mut Object, value: BOOL, characteristic: *mut Object /* CBCharacteristic* */) {
unsafe {
msg_send![cbperipheral, setNotifyValue:value forCharacteristic:characteristic];
let () = msg_send![cbperipheral, setNotifyValue:value forCharacteristic:characteristic];
}
}

pub fn peripheral_discoverdescriptorsforcharacteristic(cbperipheral: *mut Object, characteristic: *mut Object /* CBCharacteristic* */) {
unsafe {
msg_send![cbperipheral, discoverDescriptorsForCharacteristic:characteristic];
let () = msg_send![cbperipheral, discoverDescriptorsForCharacteristic:characteristic];
}
}

Expand Down

0 comments on commit fecacb7

Please sign in to comment.