Clippy suggestions and update deps

timeout_old
Tassilo Horn 3 years ago
parent 8e1de902de
commit eb30c55483
  1. 20
      Cargo.lock
  2. 16
      src/con.rs

20
Cargo.lock generated

@ -193,9 +193,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.27" version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612"
dependencies = [ dependencies = [
"unicode-xid", "unicode-xid",
] ]
@ -253,18 +253,18 @@ checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.126" version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.126" version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -273,9 +273,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.64" version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@ -326,9 +326,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.73" version = "1.0.74"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

@ -43,10 +43,10 @@ impl<'a> Iterator for NodeIter<'a> {
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {
if let Some(node) = self.stack.pop() { if let Some(node) = self.stack.pop() {
for n in &node.floating_nodes { for n in &node.floating_nodes {
self.stack.push(&n); self.stack.push(n);
} }
for n in &node.nodes { for n in &node.nodes {
self.stack.push(&n); self.stack.push(n);
} }
Some(node) Some(node)
} else { } else {
@ -296,9 +296,9 @@ fn build_windows<'a>(
for n in workspace.windows() { for n in workspace.windows() {
v.push(Window { v.push(Window {
node: &n, node: n,
extra_props: extra_props.and_then(|m| m.get(&n.id).cloned()), extra_props: extra_props.and_then(|m| m.get(&n.id).cloned()),
workspace: &workspace, workspace,
}) })
} }
} }
@ -322,14 +322,14 @@ fn build_workspaces<'a>(
.windows() .windows()
.iter() .iter()
.map(|w| Window { .map(|w| Window {
node: &w, node: w,
extra_props: extra_props.and_then(|m| m.get(&w.id).cloned()), extra_props: extra_props.and_then(|m| m.get(&w.id).cloned()),
workspace: &workspace, workspace,
}) })
.collect(); .collect();
wins.sort(); wins.sort();
v.push(Workspace { v.push(Workspace {
node: &workspace, node: workspace,
extra_props: extra_props extra_props: extra_props
.and_then(|m| m.get(&workspace.id).cloned()), .and_then(|m| m.get(&workspace.id).cloned()),
windows: wins, windows: wins,
@ -401,7 +401,7 @@ impl WsOrWin<'_> {
for ws in workspaces { for ws in workspaces {
v.push(WsOrWin::Ws { ws }); v.push(WsOrWin::Ws { ws });
for win in &ws.windows { for win in &ws.windows {
v.push(WsOrWin::Win { win: &win }); v.push(WsOrWin::Win { win });
} }
} }
v v

Loading…
Cancel
Save