[wlanstack2] Run rustfmt on wlanstack.

NET-1430

TEST: fx full-build
Change-Id: I923f6f98f49bfb1f2fe2055c3e6300da9b06dc30
diff --git a/garnet/bin/wlan/wlanstack/src/device.rs b/garnet/bin/wlan/wlanstack/src/device.rs
index ee93f41..853b323 100644
--- a/garnet/bin/wlan/wlanstack/src/device.rs
+++ b/garnet/bin/wlan/wlanstack/src/device.rs
@@ -88,8 +88,7 @@
 }
 
 pub async fn serve_ifaces(
-    ifaces: Arc<IfaceMap>,
-    cobalt_sender: CobaltSender,
+    ifaces: Arc<IfaceMap>, cobalt_sender: CobaltSender,
 ) -> Result<Never, Error> {
     let mut new_ifaces = device_watch::watch_iface_devices()?;
     let mut active_ifaces = FuturesUnordered::new();
@@ -109,9 +108,7 @@
 }
 
 async fn query_and_serve_iface(
-    new_iface: NewIfaceDevice,
-    ifaces: &IfaceMap,
-    cobalt_sender: CobaltSender,
+    new_iface: NewIfaceDevice, ifaces: &IfaceMap, cobalt_sender: CobaltSender,
 ) {
     let NewIfaceDevice { id, device, proxy } = new_iface;
     let event_stream = proxy.take_event_stream();
@@ -140,8 +137,13 @@
         device.path().to_string_lossy()
     );
     let mlme_query = MlmeQueryProxy::new(proxy);
-    ifaces
-        .insert(id, IfaceDevice { sme_server: sme, stats_sched, device, mlme_query, device_info });
+    ifaces.insert(id, IfaceDevice {
+        sme_server: sme,
+        stats_sched,
+        device,
+        mlme_query,
+        device_info,
+    });
 
     let r = await!(sme_fut);
     if let Err(e) = r {
@@ -152,11 +154,8 @@
 }
 
 fn create_sme<S>(
-    proxy: fidl_mlme::MlmeProxy,
-    event_stream: fidl_mlme::MlmeEventStream,
-    device_info: &DeviceInfo,
-    stats_requests: S,
-    cobalt_sender: CobaltSender,
+    proxy: fidl_mlme::MlmeProxy, event_stream: fidl_mlme::MlmeEventStream,
+    device_info: &DeviceInfo, stats_requests: S, cobalt_sender: CobaltSender,
 ) -> Result<(SmeServer, impl Future<Output = Result<(), Error>>), Error>
 where
     S: Stream<Item = stats_scheduler::StatsRequest> + Send + Unpin + 'static,
diff --git a/garnet/bin/wlan/wlanstack/src/future_util.rs b/garnet/bin/wlan/wlanstack/src/future_util.rs
index ce5f3b9..6a8c5e9 100644
--- a/garnet/bin/wlan/wlanstack/src/future_util.rs
+++ b/garnet/bin/wlan/wlanstack/src/future_util.rs
@@ -10,8 +10,7 @@
 use std::pin::Pin;
 
 pub struct GroupAvailable<S, T, E>
-where
-    S: Stream<Item = Result<T, E>>,
+where S: Stream<Item = Result<T, E>>
 {
     stream: Fuse<S>,
     error: Option<E>,
@@ -20,19 +19,18 @@
 impl<S, T, E> Unpin for GroupAvailable<S, T, E> where S: Unpin + Stream<Item = Result<T, E>> {}
 
 impl<S, T, E> GroupAvailable<S, T, E>
-where
-    S: Unpin + Stream<Item = Result<T, E>>,
+where S: Unpin + Stream<Item = Result<T, E>>
 {
     // Safety: projecting to `Fuse<S>` is safe because GroupAvailable is `!Unpin`
     // when `S` is `!Unpin`, and `GroupAvailable` doesn't move out of `stream`.
     unsafe_pinned!(stream: Fuse<S>);
+
     // Safety: nothing requires `error` not to move.
     unsafe_unpinned!(error: Option<E>);
 }
 
 impl<S, T, E> Stream for GroupAvailable<S, T, E>
-where
-    S: Unpin + Stream<Item = Result<T, E>>,
+where S: Unpin + Stream<Item = Result<T, E>>
 {
     type Item = Result<Vec<T>, E>;
 
@@ -59,10 +57,12 @@
 }
 
 pub trait GroupAvailableExt: Stream {
-    /// An adaptor for grouping readily available messages into a single Vec item.
+    /// An adaptor for grouping readily available messages into a single Vec
+    /// item.
     ///
-    /// Similar to StreamExt.chunks(), except the size of produced batches can be arbitrary,
-    /// and only depends on how many items were available when the stream was polled.
+    /// Similar to StreamExt.chunks(), except the size of produced batches can
+    /// be arbitrary, and only depends on how many items were available when
+    /// the stream was polled.
     fn group_available<T, E>(self) -> GroupAvailable<Self, T, E>
     where
         Self: Stream<Item = Result<T, E>>,
diff --git a/garnet/bin/wlan/wlanstack/src/logger.rs b/garnet/bin/wlan/wlanstack/src/logger.rs
index 4d0f43d..9b5b11d 100644
--- a/garnet/bin/wlan/wlanstack/src/logger.rs
+++ b/garnet/bin/wlan/wlanstack/src/logger.rs
@@ -19,9 +19,8 @@
 }
 
 impl log::Log for Logger {
-    fn enabled(&self, metadata: &log::Metadata) -> bool {
-        metadata.level() <= LOG_LEVEL
-    }
+    fn enabled(&self, metadata: &log::Metadata) -> bool { metadata.level() <= LOG_LEVEL }
+
     fn log(&self, record: &log::Record) {
         if self.enabled(record.metadata()) {
             println!(
@@ -32,5 +31,6 @@
             );
         }
     }
+
     fn flush(&self) {}
 }
diff --git a/garnet/bin/wlan/wlanstack/src/main.rs b/garnet/bin/wlan/wlanstack/src/main.rs
index e47a192..a038772 100644
--- a/garnet/bin/wlan/wlanstack/src/main.rs
+++ b/garnet/bin/wlan/wlanstack/src/main.rs
@@ -48,9 +48,7 @@
 
 impl Never {
     #[allow(missing_docs)]
-    pub fn into_any<T>(self) -> T {
-        match self {}
-    }
+    pub fn into_any<T>(self) -> T { match self {} }
 }
 
 fn main() -> Result<(), Error> {
@@ -85,11 +83,11 @@
 }
 
 fn serve_fidl(
-    phys: Arc<PhyMap>,
-    ifaces: Arc<IfaceMap>,
+    phys: Arc<PhyMap>, ifaces: Arc<IfaceMap>,
     phy_events: UnboundedReceiver<MapEvent<u16, PhyDevice>>,
     iface_events: UnboundedReceiver<MapEvent<u16, IfaceDevice>>,
-) -> Result<impl Future<Output = Result<Never, Error>>, Error> {
+) -> Result<impl Future<Output = Result<Never, Error>>, Error>
+{
     let (sender, receiver) = mpsc::unbounded();
     let fdio_server = ServicesServer::new()
         .add_service((DeviceServiceMarker::NAME, move |channel| {
diff --git a/garnet/bin/wlan/wlanstack/src/mlme_query_proxy.rs b/garnet/bin/wlan/wlanstack/src/mlme_query_proxy.rs
index 5600bce..5aa04bc 100644
--- a/garnet/bin/wlan/wlanstack/src/mlme_query_proxy.rs
+++ b/garnet/bin/wlan/wlanstack/src/mlme_query_proxy.rs
@@ -14,9 +14,7 @@
 }
 
 impl MlmeQueryProxy {
-    pub fn new(proxy: MlmeProxy) -> Self {
-        MlmeQueryProxy { proxy }
-    }
+    pub fn new(proxy: MlmeProxy) -> Self { MlmeQueryProxy { proxy } }
 
     pub fn get_minstrel_list(
         &self,
@@ -25,8 +23,7 @@
     }
 
     pub fn get_minstrel_peer(
-        &self,
-        mac_addr: [u8; 6],
+        &self, mac_addr: [u8; 6],
     ) -> impl Future<Output = Result<MinstrelStatsResponse, fidl::Error>> {
         let mut req = MinstrelStatsRequest { mac_addr };
         self.proxy.get_minstrel_stats(&mut req)
diff --git a/garnet/bin/wlan/wlanstack/src/service.rs b/garnet/bin/wlan/wlanstack/src/service.rs
index 45f0d34..a69a89f 100644
--- a/garnet/bin/wlan/wlanstack/src/service.rs
+++ b/garnet/bin/wlan/wlanstack/src/service.rs
@@ -29,11 +29,9 @@
 const CONCURRENT_LIMIT: usize = 1000;
 
 pub async fn device_service<S>(
-    phys: Arc<PhyMap>,
-    ifaces: Arc<IfaceMap>,
+    phys: Arc<PhyMap>, ifaces: Arc<IfaceMap>,
     phy_events: UnboundedReceiver<MapEvent<u16, PhyDevice>>,
-    iface_events: UnboundedReceiver<MapEvent<u16, IfaceDevice>>,
-    new_clients: S,
+    iface_events: UnboundedReceiver<MapEvent<u16, IfaceDevice>>, new_clients: S,
 ) -> Result<Never, failure::Error>
 where
     S: Stream<Item = fasync::Channel> + Unpin,
@@ -61,11 +59,10 @@
 }
 
 async fn serve_channel(
-    phys: Arc<PhyMap>,
-    ifaces: Arc<IfaceMap>,
-    watcher_service: WatcherService<PhyDevice, IfaceDevice>,
-    channel: fasync::Channel,
-) {
+    phys: Arc<PhyMap>, ifaces: Arc<IfaceMap>,
+    watcher_service: WatcherService<PhyDevice, IfaceDevice>, channel: fasync::Channel,
+)
+{
     let r = await!(fidl_svc::DeviceServiceRequestStream::from_channel(channel)
         .try_for_each_concurrent(CONCURRENT_LIMIT, move |request| handle_fidl_request(
             request,
@@ -77,14 +74,14 @@
 }
 
 async fn handle_fidl_request(
-    request: fidl_svc::DeviceServiceRequest,
-    phys: Arc<PhyMap>,
-    ifaces: Arc<IfaceMap>,
+    request: fidl_svc::DeviceServiceRequest, phys: Arc<PhyMap>, ifaces: Arc<IfaceMap>,
     watcher_service: WatcherService<PhyDevice, IfaceDevice>,
-) -> Result<(), fidl::Error> {
+) -> Result<(), fidl::Error>
+{
     // Note that errors from responder.send() are propagated intentionally.
-    // If we fail to send a response, the only way to recover is to stop serving the client
-    // and close the channel. Otherwise, the client would be left hanging forever.
+    // If we fail to send a response, the only way to recover is to stop serving the
+    // client and close the channel. Otherwise, the client would be left hanging
+    // forever.
     match request {
         DeviceServiceRequest::ListPhys { responder } => responder.send(&mut list_phys(&phys)),
         DeviceServiceRequest::QueryPhy { req, responder } => {
@@ -203,8 +200,7 @@
 }
 
 async fn create_iface(
-    phys: &PhyMap,
-    req: fidl_svc::CreateIfaceRequest,
+    phys: &PhyMap, req: fidl_svc::CreateIfaceRequest,
 ) -> Result<fidl_svc::CreateIfaceResponse, zx::Status> {
     let phy = phys.get(&req.phy_id).ok_or(zx::Status::NOT_FOUND)?;
     let mut phy_req = fidl_wlan_dev::CreateIfaceRequest { role: req.role };
@@ -218,9 +214,7 @@
 }
 
 fn get_client_sme(
-    ifaces: &IfaceMap,
-    iface_id: u16,
-    endpoint: station::client::Endpoint,
+    ifaces: &IfaceMap, iface_id: u16, endpoint: station::client::Endpoint,
 ) -> zx::Status {
     let iface = ifaces.get(&iface_id);
     let server = match iface {
@@ -281,8 +275,7 @@
 }
 
 async fn list_minstrel_peers(
-    ifaces: &IfaceMap,
-    iface_id: u16,
+    ifaces: &IfaceMap, iface_id: u16,
 ) -> (zx::Status, fidl_fuchsia_wlan_minstrel::Peers) {
     let empty_peer_list = fidl_fuchsia_wlan_minstrel::Peers { peers: vec![] };
     let iface = match ifaces.get(&iface_id) {
@@ -296,9 +289,7 @@
 }
 
 async fn get_minstrel_stats(
-    ifaces: &IfaceMap,
-    iface_id: u16,
-    mac_addr: [u8; 6],
+    ifaces: &IfaceMap, iface_id: u16, mac_addr: [u8; 6],
 ) -> (zx::Status, Option<Box<fidl_fuchsia_wlan_minstrel::Peer>>) {
     let iface = match ifaces.get(&iface_id) {
         Some(iface) => iface,
@@ -346,10 +337,10 @@
         let mut list = super::list_phys(&phy_map).phys;
         list.sort_by_key(|p| p.phy_id);
         assert_eq!(
-            vec![
-                PhyListItem { phy_id: 10u16, path: "/dev/null".to_string() },
-                PhyListItem { phy_id: 20u16, path: "/dev/zero".to_string() },
-            ],
+            vec![PhyListItem { phy_id: 10u16, path: "/dev/null".to_string() }, PhyListItem {
+                phy_id: 20u16,
+                path: "/dev/zero".to_string()
+            },],
             list
         )
     }
@@ -414,10 +405,10 @@
         let mut list = super::list_ifaces(&iface_map).ifaces;
         list.sort_by_key(|p| p.iface_id);
         assert_eq!(
-            vec![
-                IfaceListItem { iface_id: 10u16, path: "/dev/null".to_string() },
-                IfaceListItem { iface_id: 20u16, path: "/dev/zero".to_string() },
-            ],
+            vec![IfaceListItem { iface_id: 10u16, path: "/dev/null".to_string() }, IfaceListItem {
+                iface_id: 20u16,
+                path: "/dev/zero".to_string()
+            },],
             list
         )
     }
@@ -459,10 +450,10 @@
 
         // Initiate a CreateIface request. The returned future should not be able
         // to produce a result immediately
-        let create_fut = super::create_iface(
-            &phy_map,
-            fidl_svc::CreateIfaceRequest { phy_id: 10, role: fidl_wlan_dev::MacRole::Client },
-        );
+        let create_fut = super::create_iface(&phy_map, fidl_svc::CreateIfaceRequest {
+            phy_id: 10,
+            role: fidl_wlan_dev::MacRole::Client,
+        });
         pin_mut!(create_fut);
         assert_eq!(Poll::Pending, exec.run_until_stalled(&mut create_fut));
 
@@ -498,10 +489,10 @@
         let (phy_map, _phy_map_events) = PhyMap::new();
         let phy_map = Arc::new(phy_map);
 
-        let fut = super::create_iface(
-            &phy_map,
-            fidl_svc::CreateIfaceRequest { phy_id: 10, role: fidl_wlan_dev::MacRole::Client },
-        );
+        let fut = super::create_iface(&phy_map, fidl_svc::CreateIfaceRequest {
+            phy_id: 10,
+            role: fidl_wlan_dev::MacRole::Client,
+        });
         pin_mut!(fut);
         assert_eq!(Poll::Ready(Err(zx::Status::NOT_FOUND)), exec.run_until_stalled(&mut fut));
     }
diff --git a/garnet/bin/wlan/wlanstack/src/station/ap.rs b/garnet/bin/wlan/wlanstack/src/station/ap.rs
index 9c54fe2..68ade6d 100644
--- a/garnet/bin/wlan/wlanstack/src/station/ap.rs
+++ b/garnet/bin/wlan/wlanstack/src/station/ap.rs
@@ -23,11 +23,8 @@
 type Sme = ap_sme::ApSme;
 
 pub async fn serve<S>(
-    proxy: MlmeProxy,
-    device_info: DeviceInfo,
-    event_stream: MlmeEventStream,
-    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
-    stats_requests: S,
+    proxy: MlmeProxy, device_info: DeviceInfo, event_stream: MlmeEventStream,
+    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>, stats_requests: S,
 ) -> Result<(), failure::Error>
 where
     S: Stream<Item = StatsRequest> + Send + Unpin,
@@ -53,8 +50,7 @@
 }
 
 async fn serve_fidl(
-    sme: &Mutex<Sme>,
-    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
+    sme: &Mutex<Sme>, new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
 ) -> Result<Never, failure::Error> {
     let mut new_fidl_clients = new_fidl_clients.fuse();
     let mut fidl_clients = FuturesUnordered::new();
@@ -87,8 +83,7 @@
 }
 
 async fn handle_fidl_request(
-    sme: &Mutex<Sme>,
-    request: fidl_sme::ApSmeRequest,
+    sme: &Mutex<Sme>, request: fidl_sme::ApSmeRequest,
 ) -> Result<(), ::fidl::Error> {
     match request {
         fidl_sme::ApSmeRequest::Start { config, responder } => {
diff --git a/garnet/bin/wlan/wlanstack/src/station/client.rs b/garnet/bin/wlan/wlanstack/src/station/client.rs
index 5232b5a..a516a7c 100644
--- a/garnet/bin/wlan/wlanstack/src/station/client.rs
+++ b/garnet/bin/wlan/wlanstack/src/station/client.rs
@@ -39,11 +39,8 @@
 }
 
 pub async fn serve<S>(
-    proxy: MlmeProxy,
-    device_info: DeviceInfo,
-    event_stream: MlmeEventStream,
-    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
-    stats_requests: S,
+    proxy: MlmeProxy, device_info: DeviceInfo, event_stream: MlmeEventStream,
+    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>, stats_requests: S,
     cobalt_sender: CobaltSender,
 ) -> Result<(), failure::Error>
 where
@@ -69,11 +66,10 @@
 }
 
 async fn serve_fidl(
-    sme: Arc<Mutex<Sme>>,
-    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
-    info_stream: InfoStream,
-    mut cobalt_sender: CobaltSender,
-) -> Result<Never, failure::Error> {
+    sme: Arc<Mutex<Sme>>, new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
+    info_stream: InfoStream, mut cobalt_sender: CobaltSender,
+) -> Result<Never, failure::Error>
+{
     let mut new_fidl_clients = new_fidl_clients.fuse();
     let mut info_stream = info_stream.fuse();
     let mut fidl_clients = FuturesUnordered::new();
@@ -119,8 +115,7 @@
 }
 
 async fn handle_fidl_request(
-    sme: &Mutex<Sme>,
-    request: fidl_sme::ClientSmeRequest,
+    sme: &Mutex<Sme>, request: fidl_sme::ClientSmeRequest,
 ) -> Result<(), fidl::Error> {
     match request {
         ClientSmeRequest::Scan { req, txn, .. } => Ok(await!(scan(sme, txn, req.scan_type))
@@ -136,10 +131,10 @@
 }
 
 async fn scan(
-    sme: &Mutex<Sme>,
-    txn: ServerEnd<fidl_sme::ScanTransactionMarker>,
+    sme: &Mutex<Sme>, txn: ServerEnd<fidl_sme::ScanTransactionMarker>,
     scan_type: fidl_common::ScanType,
-) -> Result<(), failure::Error> {
+) -> Result<(), failure::Error>
+{
     let handle = txn.into_stream()?.control_handle();
     let receiver = sme.lock().unwrap().on_scan_command(scan_type);
     let result = await!(receiver).unwrap_or(Err(DiscoveryError::InternalError));
@@ -149,10 +144,10 @@
 }
 
 async fn connect(
-    sme: &Mutex<Sme>,
-    txn: Option<ServerEnd<fidl_sme::ConnectTransactionMarker>>,
+    sme: &Mutex<Sme>, txn: Option<ServerEnd<fidl_sme::ConnectTransactionMarker>>,
     req: fidl_sme::ConnectRequest,
-) -> Result<(), failure::Error> {
+) -> Result<(), failure::Error>
+{
     let handle = match txn {
         None => None,
         Some(txn) => Some(txn.into_stream()?.control_handle()),
@@ -171,9 +166,7 @@
     }
 }
 
-fn disconnect(sme: &Mutex<Sme>) {
-    sme.lock().unwrap().on_disconnect_command();
-}
+fn disconnect(sme: &Mutex<Sme>) { sme.lock().unwrap().on_disconnect_command(); }
 
 fn status(sme: &Mutex<Sme>) -> fidl_sme::ClientStatusResponse {
     let status = sme.lock().unwrap().status();
@@ -192,9 +185,7 @@
 }
 
 fn handle_info_event(
-    e: InfoEvent,
-    cobalt_sender: &mut CobaltSender,
-    connection_times: &mut ConnectionTimes,
+    e: InfoEvent, cobalt_sender: &mut CobaltSender, connection_times: &mut ConnectionTimes,
 ) {
     match e {
         InfoEvent::ConnectStarted => {
@@ -280,8 +271,7 @@
 }
 
 fn send_scan_results(
-    handle: fidl_sme::ScanTransactionControlHandle,
-    result: EssDiscoveryResult,
+    handle: fidl_sme::ScanTransactionControlHandle, result: EssDiscoveryResult,
 ) -> Result<(), fidl::Error> {
     match result {
         Ok(ess_list) => {
@@ -319,8 +309,7 @@
 }
 
 fn send_connect_result(
-    handle: Option<fidl_sme::ConnectTransactionControlHandle>,
-    result: ConnectResult,
+    handle: Option<fidl_sme::ConnectTransactionControlHandle>, result: ConnectResult,
 ) -> Result<(), fidl::Error> {
     if let Some(handle) = handle {
         let code = match result {
diff --git a/garnet/bin/wlan/wlanstack/src/station/mesh.rs b/garnet/bin/wlan/wlanstack/src/station/mesh.rs
index 16328d3..15e8716 100644
--- a/garnet/bin/wlan/wlanstack/src/station/mesh.rs
+++ b/garnet/bin/wlan/wlanstack/src/station/mesh.rs
@@ -28,11 +28,8 @@
 type Sme = mesh_sme::MeshSme;
 
 pub async fn serve<S>(
-    proxy: MlmeProxy,
-    device_info: DeviceInfo,
-    event_stream: MlmeEventStream,
-    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
-    stats_requests: S,
+    proxy: MlmeProxy, device_info: DeviceInfo, event_stream: MlmeEventStream,
+    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>, stats_requests: S,
 ) -> Result<(), failure::Error>
 where
     S: Stream<Item = StatsRequest> + Send + Unpin,
@@ -59,9 +56,7 @@
 }
 
 async fn serve_fidl<'a>(
-    sme: &'a Mutex<Sme>,
-    new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>,
-    proxy: &'a MlmeProxy,
+    sme: &'a Mutex<Sme>, new_fidl_clients: mpsc::UnboundedReceiver<Endpoint>, proxy: &'a MlmeProxy,
 ) -> Result<Never, failure::Error> {
     let mut fidl_clients = FuturesUnordered::new();
     let mut new_fidl_clients = new_fidl_clients.fuse();
@@ -95,9 +90,7 @@
 }
 
 async fn handle_fidl_request<'a>(
-    proxy: &'a MlmeProxy,
-    sme: &'a Mutex<Sme>,
-    request: fidl_sme::MeshSmeRequest,
+    proxy: &'a MlmeProxy, sme: &'a Mutex<Sme>, request: fidl_sme::MeshSmeRequest,
 ) -> Result<(), ::fidl::Error> {
     match request {
         fidl_sme::MeshSmeRequest::Join { config, responder } => {
@@ -116,8 +109,7 @@
 }
 
 async fn get_mesh_path_table<'a>(
-    proxy: &'a MlmeProxy,
-    _sme: &'a Mutex<Sme>,
+    proxy: &'a MlmeProxy, _sme: &'a Mutex<Sme>,
 ) -> (fidl_sme::GetMeshPathTableResultCode, fidl_mesh::MeshPathTable) {
     let mut dummy = fidl_mlme::GetMeshPathTableRequest { dummy: 0 };
     let table = await!(proxy.get_mesh_path_table_req(&mut dummy));
@@ -125,10 +117,9 @@
         Ok(tbl) => (fidl_sme::GetMeshPathTableResultCode::Success, tbl),
         Err(err) => {
             error!("Error received in getting mesh path table from MLME: {}", err);
-            (
-                fidl_sme::GetMeshPathTableResultCode::InternalError,
-                fidl_mesh::MeshPathTable { paths: Vec::new() },
-            )
+            (fidl_sme::GetMeshPathTableResultCode::InternalError, fidl_mesh::MeshPathTable {
+                paths: Vec::new(),
+            })
         }
     }
 }
diff --git a/garnet/bin/wlan/wlanstack/src/station/mod.rs b/garnet/bin/wlan/wlanstack/src/station/mod.rs
index d60dc5e2..14c9b1c 100644
--- a/garnet/bin/wlan/wlanstack/src/station/mod.rs
+++ b/garnet/bin/wlan/wlanstack/src/station/mod.rs
@@ -28,12 +28,8 @@
 
 // The returned future successfully terminates when MLME closes the channel
 async fn serve_mlme_sme<STA, SRS, TS>(
-    proxy: MlmeProxy,
-    mut event_stream: MlmeEventStream,
-    station: Arc<Mutex<STA>>,
-    mut mlme_stream: MlmeStream,
-    stats_requests: SRS,
-    time_stream: TS,
+    proxy: MlmeProxy, mut event_stream: MlmeEventStream, station: Arc<Mutex<STA>>,
+    mut mlme_stream: MlmeStream, stats_requests: SRS, time_stream: TS,
 ) -> Result<(), failure::Error>
 where
     STA: Station,
@@ -106,8 +102,7 @@
 }
 
 fn handle_stats_resp(
-    stats_sender: &mut mpsc::Sender<IfaceStats>,
-    resp: fidl_mlme::StatsQueryResponse,
+    stats_sender: &mut mpsc::Sender<IfaceStats>, resp: fidl_mlme::StatsQueryResponse,
 ) -> Result<(), failure::Error> {
     stats_sender.try_send(resp.stats).or_else(|e| {
         if e.is_full() {
@@ -122,13 +117,9 @@
 }
 
 async fn serve_stats<S>(
-    proxy: MlmeProxy,
-    mut stats_requests: S,
-    mut responses: mpsc::Receiver<IfaceStats>,
+    proxy: MlmeProxy, mut stats_requests: S, mut responses: mpsc::Receiver<IfaceStats>,
 ) -> Result<Never, failure::Error>
-where
-    S: Stream<Item = StatsRequest> + Unpin,
-{
+where S: Stream<Item = StatsRequest> + Unpin {
     while let Some(req) = await!(stats_requests.next()) {
         proxy
             .stats_query_req()
diff --git a/garnet/bin/wlan/wlanstack/src/stats_scheduler.rs b/garnet/bin/wlan/wlanstack/src/stats_scheduler.rs
index f3ce526..f483309 100644
--- a/garnet/bin/wlan/wlanstack/src/stats_scheduler.rs
+++ b/garnet/bin/wlan/wlanstack/src/stats_scheduler.rs
@@ -157,8 +157,6 @@
         }
     }
 
-    fn fake_counter(count: u64) -> Counter {
-        Counter { count: count, name: "foo".to_string() }
-    }
+    fn fake_counter(count: u64) -> Counter { Counter { count, name: "foo".to_string() } }
 
 }
diff --git a/garnet/bin/wlan/wlanstack/src/telemetry.rs b/garnet/bin/wlan/wlanstack/src/telemetry.rs
index b981587..35941c1 100644
--- a/garnet/bin/wlan/wlanstack/src/telemetry.rs
+++ b/garnet/bin/wlan/wlanstack/src/telemetry.rs
@@ -31,7 +31,8 @@
 
 const REPORT_PERIOD_MINUTES: i64 = 1;
 
-// These IDs must match the Cobalt config from //third_party/cobalt_config/fuchsia/wlan/config.yaml
+// These IDs must match the Cobalt config from
+// //third_party/cobalt_config/fuchsia/wlan/config.yaml
 enum CobaltMetricId {
     RsnaDelay = 2,
     AssociationDelay = 3,
@@ -88,20 +89,20 @@
 }
 
 fn report_stats(
-    last_stats: &fidl_stats::IfaceStats,
-    current_stats: &fidl_stats::IfaceStats,
+    last_stats: &fidl_stats::IfaceStats, current_stats: &fidl_stats::IfaceStats,
     sender: &mut CobaltSender,
-) {
+)
+{
     report_mlme_stats(&last_stats.mlme_stats, &current_stats.mlme_stats, sender);
 
     report_dispatcher_stats(&last_stats.dispatcher_stats, &current_stats.dispatcher_stats, sender);
 }
 
 fn report_dispatcher_stats(
-    last_stats: &fidl_stats::DispatcherStats,
-    current_stats: &fidl_stats::DispatcherStats,
+    last_stats: &fidl_stats::DispatcherStats, current_stats: &fidl_stats::DispatcherStats,
     sender: &mut CobaltSender,
-) {
+)
+{
     // These indexes must match the Cobalt config from
     // //third_party/cobalt_config/fuchsia/wlan/config.yaml
     const DISPATCHER_IN_PACKET_COUNT_INDEX: u32 = 0;
@@ -134,10 +135,10 @@
 }
 
 fn report_mlme_stats(
-    last: &Option<Box<fidl_stats::MlmeStats>>,
-    current: &Option<Box<fidl_stats::MlmeStats>>,
+    last: &Option<Box<fidl_stats::MlmeStats>>, current: &Option<Box<fidl_stats::MlmeStats>>,
     sender: &mut CobaltSender,
-) {
+)
+{
     if let (Some(ref last), Some(ref current)) = (last, current) {
         match (last.as_ref(), current.as_ref()) {
             (ClientMlmeStats(last), ClientMlmeStats(current)) => {
@@ -150,10 +151,10 @@
 }
 
 fn report_client_mlme_stats(
-    last_stats: &fidl_stats::ClientMlmeStats,
-    current_stats: &fidl_stats::ClientMlmeStats,
+    last_stats: &fidl_stats::ClientMlmeStats, current_stats: &fidl_stats::ClientMlmeStats,
     sender: &mut CobaltSender,
-) {
+)
+{
     report_rssi_stats(
         CobaltMetricId::ClientAssocDataRssi as u32,
         &last_stats.assoc_data_rssi,
@@ -171,10 +172,10 @@
 }
 
 fn report_client_mlme_rx_tx_frames(
-    last_stats: &fidl_stats::ClientMlmeStats,
-    current_stats: &fidl_stats::ClientMlmeStats,
+    last_stats: &fidl_stats::ClientMlmeStats, current_stats: &fidl_stats::ClientMlmeStats,
     sender: &mut CobaltSender,
-) {
+)
+{
     // These indexes must match the Cobalt config from
     // //third_party/cobalt_config/fuchsia/wlan/config.yaml
     const CLIENT_MLME_RX_FRAME_COUNT_INDEX: u32 = 0;
@@ -208,11 +209,10 @@
 }
 
 fn report_rssi_stats(
-    rssi_metric_id: u32,
-    last_stats: &fidl_stats::RssiStats,
-    current_stats: &fidl_stats::RssiStats,
+    rssi_metric_id: u32, last_stats: &fidl_stats::RssiStats, current_stats: &fidl_stats::RssiStats,
     sender: &mut CobaltSender,
-) {
+)
+{
     // In the internal stats histogram, hist[x] represents the number of frames
     // with RSSI -x. For the Cobalt representation, buckets from -128 to 0 are
     // used. When data is sent to Cobalt, the concept of index is utilized.
@@ -244,21 +244,17 @@
 }
 
 pub fn report_scan_delay(
-    sender: &mut CobaltSender,
-    scan_started_time: zx::Time,
-    scan_finished_time: zx::Time,
+    sender: &mut CobaltSender, scan_started_time: zx::Time, scan_finished_time: zx::Time,
 ) {
     let delay_micros = (scan_finished_time - scan_started_time).nanos() / 1000;
     sender.log_elapsed_time(CobaltMetricId::ScanDelay as u32, 0, delay_micros);
 }
 
 pub fn report_connection_delay(
-    sender: &mut CobaltSender,
-    conn_started_time: zx::Time,
-    conn_finished_time: zx::Time,
-    result: &ConnectResult,
-    failure: &Option<ConnectFailure>,
-) {
+    sender: &mut CobaltSender, conn_started_time: zx::Time, conn_finished_time: zx::Time,
+    result: &ConnectResult, failure: &Option<ConnectFailure>,
+)
+{
     let delay_micros = (conn_finished_time - conn_started_time).nanos() / 1000;
     let cobalt_index = match (result, failure) {
         (ConnectResult::Success, None) => Some(ConnectionResultLabel::SuccessId),
@@ -277,27 +273,21 @@
 }
 
 pub fn report_assoc_success_delay(
-    sender: &mut CobaltSender,
-    assoc_started_time: zx::Time,
-    assoc_finished_time: zx::Time,
+    sender: &mut CobaltSender, assoc_started_time: zx::Time, assoc_finished_time: zx::Time,
 ) {
     let delay_micros = (assoc_finished_time - assoc_started_time).nanos() / 1000;
     sender.log_elapsed_time(CobaltMetricId::AssociationDelay as u32, 0, delay_micros);
 }
 
 pub fn report_rsna_established_delay(
-    sender: &mut CobaltSender,
-    rsna_started_time: zx::Time,
-    rsna_finished_time: zx::Time,
+    sender: &mut CobaltSender, rsna_started_time: zx::Time, rsna_finished_time: zx::Time,
 ) {
     let delay_micros = (rsna_finished_time - rsna_started_time).nanos() / 1000;
     sender.log_elapsed_time(CobaltMetricId::RsnaDelay as u32, 0, delay_micros);
 }
 
 pub fn report_neighbor_networks_count(
-    sender: &mut CobaltSender,
-    bss_count: usize,
-    ess_count: usize,
+    sender: &mut CobaltSender, bss_count: usize, ess_count: usize,
 ) {
     const BSS_COUNT_INDEX: u32 = 0;
     const ESS_COUNT_INDEX: u32 = 1;
@@ -314,8 +304,7 @@
 }
 
 pub fn report_standards(
-    sender: &mut CobaltSender,
-    mut num_bss_by_standard: HashMap<Standard, usize>,
+    sender: &mut CobaltSender, mut num_bss_by_standard: HashMap<Standard, usize>,
 ) {
     const ALL_STANDARDS: [(Standard, StandardLabel); 5] = [
         (Standard::B, StandardLabel::B),
@@ -426,9 +415,7 @@
 }
 
 fn get_diff<T>(last_stat: T, current_stat: T) -> T
-where
-    T: Sub<Output = T> + PartialOrd + Default,
-{
+where T: Sub<Output = T> + PartialOrd + Default {
     if current_stat >= last_stat {
         current_stat - last_stat
     } else {
diff --git a/garnet/bin/wlan/wlanstack/src/watchable_map.rs b/garnet/bin/wlan/wlanstack/src/watchable_map.rs
index a488024..9d24f07 100644
--- a/garnet/bin/wlan/wlanstack/src/watchable_map.rs
+++ b/garnet/bin/wlan/wlanstack/src/watchable_map.rs
@@ -17,16 +17,14 @@
 /// All mutations and snapshots are totally ordered, and events in the
 /// queue are guaranteed to follow the same order.
 pub struct WatchableMap<K, V>
-where
-    K: Hash + Eq,
+where K: Hash + Eq
 {
     inner: Mutex<Inner<K, V>>,
 }
 
 #[derive(Debug)]
 pub enum MapEvent<K, V>
-where
-    K: Hash + Eq,
+where K: Hash + Eq
 {
     KeyInserted(K),
     KeyRemoved(K),
@@ -34,8 +32,7 @@
 }
 
 struct Inner<K, V>
-where
-    K: Hash + Eq,
+where K: Hash + Eq
 {
     // Storing the map in an Arc allows us to use copy-on-write:
     // taking a snapshot is simply cloning an Arc, and all mutations
@@ -46,8 +43,7 @@
 }
 
 impl<K, V> WatchableMap<K, V>
-where
-    K: Clone + Hash + Eq,
+where K: Clone + Hash + Eq
 {
     /// Returns an empty map and the receiving end of the event queue
     pub fn new() -> (Self, UnboundedReceiver<MapEvent<K, V>>) {
@@ -87,9 +83,7 @@
     }
 
     /// Get a snapshot without pushing it to the queue
-    pub fn get_snapshot(&self) -> Arc<HashMap<K, Arc<V>>> {
-        self.inner.lock().map.clone()
-    }
+    pub fn get_snapshot(&self) -> Arc<HashMap<K, Arc<V>>> { self.inner.lock().map.clone() }
 
     pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<Arc<V>>
     where
diff --git a/garnet/bin/wlan/wlanstack/src/watcher_service.rs b/garnet/bin/wlan/wlanstack/src/watcher_service.rs
index 6d1a930..a8d43fb6 100644
--- a/garnet/bin/wlan/wlanstack/src/watcher_service.rs
+++ b/garnet/bin/wlan/wlanstack/src/watcher_service.rs
@@ -21,8 +21,7 @@
 // In reality, P and I are always PhyDevice and IfaceDevice, respectively.
 // They are generic solely for the purpose of mocking for tests.
 pub fn serve_watchers<P, I>(
-    phys: Arc<WatchableMap<u16, P>>,
-    ifaces: Arc<WatchableMap<u16, I>>,
+    phys: Arc<WatchableMap<u16, P>>, ifaces: Arc<WatchableMap<u16, I>>,
     phy_events: UnboundedReceiver<MapEvent<u16, P>>,
     iface_events: UnboundedReceiver<MapEvent<u16, I>>,
 ) -> (WatcherService<P, I>, impl Future<Output = Result<Never, failure::Error>>)
@@ -58,8 +57,7 @@
 
 impl<P, I> WatcherService<P, I> {
     pub fn add_watcher(
-        &self,
-        endpoint: ServerEnd<fidl_svc::DeviceWatcherMarker>,
+        &self, endpoint: ServerEnd<fidl_svc::DeviceWatcherMarker>,
     ) -> Result<(), fidl::Error> {
         let stream = endpoint.into_stream()?;
         let handle = stream.control_handle();
@@ -71,10 +69,11 @@
                 watcher_id: inner.next_watcher_id,
             })
             .expect("failed to submit a task to the watcher reaper: {}");
-        inner.watchers.insert(
-            inner.next_watcher_id,
-            Watcher { handle, sent_phy_snapshot: false, sent_iface_snapshot: false },
-        );
+        inner.watchers.insert(inner.next_watcher_id, Watcher {
+            handle,
+            sent_phy_snapshot: false,
+            sent_iface_snapshot: false,
+        });
         inner.phys.request_snapshot();
         inner.ifaces.request_snapshot();
         inner.next_watcher_id += 1;
@@ -112,10 +111,7 @@
     }
 
     fn send_snapshot<F, G, T>(
-        &mut self,
-        sent_snapshot: F,
-        send_on_add: G,
-        snapshot: Arc<HashMap<u16, T>>,
+        &mut self, sent_snapshot: F, send_on_add: G, snapshot: Arc<HashMap<u16, T>>,
     ) where
         F: Fn(&mut Watcher) -> &mut bool,
         G: Fn(&DeviceWatcherControlHandle, u16) -> Result<(), fidl::Error>,
@@ -144,8 +140,7 @@
 }
 
 async fn notify_phy_watchers<P, I>(
-    mut events: UnboundedReceiver<MapEvent<u16, P>>,
-    inner: &Mutex<Inner<P, I>>,
+    mut events: UnboundedReceiver<MapEvent<u16, P>>, inner: &Mutex<Inner<P, I>>,
 ) -> Result<Never, failure::Error> {
     while let Some(e) = await!(events.next()) {
         match e {
@@ -166,8 +161,7 @@
 }
 
 async fn notify_iface_watchers<P, I>(
-    mut events: UnboundedReceiver<MapEvent<u16, I>>,
-    inner: &Mutex<Inner<P, I>>,
+    mut events: UnboundedReceiver<MapEvent<u16, I>>, inner: &Mutex<Inner<P, I>>,
 ) -> Result<Never, failure::Error> {
     while let Some(e) = await!(events.next()) {
         match e {
@@ -192,13 +186,12 @@
     watcher_id: u64,
 }
 
-/// A future that removes watchers from device maps when their FIDL channels get closed.
-/// Performing this clean up solely when notification fails is not sufficient:
-/// in the scenario where devices are not being added or removed, but new clients come and go,
-/// the watcher list could grow without bound.
+/// A future that removes watchers from device maps when their FIDL channels get
+/// closed. Performing this clean up solely when notification fails is not
+/// sufficient: in the scenario where devices are not being added or removed,
+/// but new clients come and go, the watcher list could grow without bound.
 async fn reap_watchers<P, I>(
-    inner: &Mutex<Inner<P, I>>,
-    watchers: UnboundedReceiver<ReaperTask>,
+    inner: &Mutex<Inner<P, I>>, watchers: UnboundedReceiver<ReaperTask>,
 ) -> Result<Never, failure::Error> {
     const REAP_CONCURRENT_LIMIT: usize = 10000;
     await!(watchers.for_each_concurrent(REAP_CONCURRENT_LIMIT, move |w| {
@@ -450,8 +443,7 @@
     }
 
     fn fetch_events(
-        exec: &mut fasync::Executor,
-        stream: fidl_svc::DeviceWatcherEventStream,
+        exec: &mut fasync::Executor, stream: fidl_svc::DeviceWatcherEventStream,
     ) -> Vec<DeviceWatcherEvent> {
         let events = Arc::new(Mutex::new(Some(Vec::new())));
         let events_two = events.clone();