Replace Option.and_then(|x| Some(y)) with map(|x| y) in service/network
This fixes a clippy error introduced in 1.45.0 rust
@@ -612,9 +612,9 @@ impl ServiceConnectionMap {
self.by_endpoint
.remove(endpoint)
.and_then(|identity| self.services.remove(&identity))
- .and_then(|info| {
+ .map(|info| {
self.by_connection_id.remove(&info.connection_id);
- Some(info)
+ info
})
}
