From eb30c554834fe68a6526bbd6bd559e247a2a1dea Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Mon, 2 Aug 2021 20:42:01 +0200 Subject: [PATCH] Clippy suggestions and update deps --- Cargo.lock | 20 ++++++++++---------- src/con.rs | 16 ++++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a2baebb..b2f5316 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -193,9 +193,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" dependencies = [ "unicode-xid", ] @@ -253,18 +253,18 @@ checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "serde" -version = "1.0.126" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" +checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.126" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" +checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" dependencies = [ "proc-macro2", "quote", @@ -273,9 +273,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" dependencies = [ "itoa", "ryu", @@ -326,9 +326,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.73" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" +checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c" dependencies = [ "proc-macro2", "quote", diff --git a/src/con.rs b/src/con.rs index 3bed176..bb18837 100644 --- a/src/con.rs +++ b/src/con.rs @@ -43,10 +43,10 @@ impl<'a> Iterator for NodeIter<'a> { fn next(&mut self) -> Option { if let Some(node) = self.stack.pop() { for n in &node.floating_nodes { - self.stack.push(&n); + self.stack.push(n); } for n in &node.nodes { - self.stack.push(&n); + self.stack.push(n); } Some(node) } else { @@ -296,9 +296,9 @@ fn build_windows<'a>( for n in workspace.windows() { v.push(Window { - node: &n, + node: n, extra_props: extra_props.and_then(|m| m.get(&n.id).cloned()), - workspace: &workspace, + workspace, }) } } @@ -322,14 +322,14 @@ fn build_workspaces<'a>( .windows() .iter() .map(|w| Window { - node: &w, + node: w, extra_props: extra_props.and_then(|m| m.get(&w.id).cloned()), - workspace: &workspace, + workspace, }) .collect(); wins.sort(); v.push(Workspace { - node: &workspace, + node: workspace, extra_props: extra_props .and_then(|m| m.get(&workspace.id).cloned()), windows: wins, @@ -401,7 +401,7 @@ impl WsOrWin<'_> { for ws in workspaces { v.push(WsOrWin::Ws { ws }); for win in &ws.windows { - v.push(WsOrWin::Win { win: &win }); + v.push(WsOrWin::Win { win }); } } v