fn id_for_pointer(&mut self, device_id: &DeviceId) -> PointerId {
        if let Some(pointer_id) = self.pointer_id.get(device_id) {
            // Already assigned
            *pointer_id
        } else {
            // Assign a new pointer ID
            let pointer_id = self.pointer_id.len() as _;
            let pointer_id = PointerId(pointer_id);

            // Store in the hash map
            self.pointer_id.insert(*device_id, pointer_id);
            pointer_id
        }
    }
///
/// Retrieves or assigns an ID to a device
///
Retrieves or assigns an ID to a device
Retrieves or assigns an ID to a device
fn id_for_pointer(&mut self, device_id: &DeviceId) -> PointerId {
        if let Some(pointer_id) = self.pointer_id.get(device_id) {
            // Already assigned
            *pointer_id
        } else {
            // Assign a new pointer ID
            let pointer_id = self.pointer_id.len() as _;
            let pointer_id = PointerId(pointer_id);
            // Store in the hash map
            self.pointer_id.insert(*device_id, pointer_id);
            pointer_id
        }
    }
fn id_for_pointer ( & mut self , device_id : & DeviceId ) -> PointerId { if let Some ( pointer_id ) = self . pointer_id . get ( device_id ) { // Already assigned * pointer_id } else { // Assign a new pointer ID let pointer_id = self . pointer_id . len ( ) as _ ; let pointer_id = PointerId ( pointer_id ) ; // Store in the hash map self . pointer_id . insert ( * device_id , pointer_id ) ; pointer_id } }
Retrieves or assigns an ID to a device
Retrieves or assigns an ID to a device
&mut self
device_id
&DeviceId