cli: cleanup some process querying code (#170306)

Avoid pulling system info we don't have to.

Minor cleanups while working on https://github.com/microsoft/vscode/pull/170305
This commit is contained in:
Connor Peet
2022-12-30 12:55:57 -08:00
committed by GitHub
parent 6106980525
commit b5ad508dfb
3 changed files with 13 additions and 29 deletions

View File

@@ -94,9 +94,7 @@ impl HandlerContext {
async fn dispose(self) {
let bridges: ServerBridgeList = {
let mut lock = self.server_bridges.lock().await;
let bridges = lock.take();
*lock = None;
bridges
lock.take()
};
if let Some(b) = bridges {