···276276 // address), consider it disconnected and eject it from the map. This
277277 // should also trigger a disconnect event before our new DeviceAdded
278278 // message goes out, so timing matters here.
279279- if let Some((_, old_device)) = self.device_map.remove(&device_index) {
279279+ match self.device_map.remove(&device_index) { Some((_, old_device)) => {
280280 info!("Device map contains key {}.", device_index);
281281 // After removing the device from the array, manually disconnect it to
282282 // make sure the event is thrown.
···285285 // anything with it, but should at least log it.
286286 error!("Error during index collision disconnect: {:?}", err);
287287 }
288288- } else {
288288+ } _ => {
289289 info!("Device map does not contain key {}.", device_index);
290290- }
290290+ }}
291291292292 // Create event loop for forwarding device events into our selector.
293293 let event_listener = device.event_stream();
···119119 /// Retreive an async stream of ButtplugServerMessages. This is how the server sends out
120120 /// non-query-related updates to the system, including information on devices being added/removed,
121121 /// client disconnection, etc...
122122- pub fn event_stream(&self) -> impl Stream<Item = ButtplugServerMessageVariant> {
122122+ pub fn event_stream(&self) -> impl Stream<Item = ButtplugServerMessageVariant> + use<> {
123123 let spec_version = self.spec_version.clone();
124124 let converter = ButtplugServerMessageConverter::new(None);
125125 self.server_version_event_stream().map(move |m| {
···138138 /// Retreive an async stream of ButtplugServerMessages, always at the latest available message
139139 /// spec. This is how the server sends out non-query-related updates to the system, including
140140 /// information on devices being added/removed, client disconnection, etc...
141141- pub fn server_version_event_stream(&self) -> impl Stream<Item = ButtplugServerMessageV4> {
141141+ pub fn server_version_event_stream(&self) -> impl Stream<Item = ButtplugServerMessageV4> + use<> {
142142 // Unlike the client API, we can expect anyone using the server to pin this
143143 // themselves.
144144 let server_receiver = convert_broadcast_receiver_to_stream(self.output_sender.subscribe());