Skip to content

Commit

Permalink
Format + reduce warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
WilfSilver authored and elkowar committed Dec 20, 2023
1 parent cac553e commit 80441ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/eww/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fn parse_window_id_args(s: &str) -> Result<(String, VarName, DynVal)> {
// Parse the = first so we know if an id has not been given
let (name, value) = parse_var_update_arg(s)?;

let (id, var_name) = (&name.0).split_once(':').unwrap_or((&"", &name.0));
let (id, var_name) = name.0.split_once(':').unwrap_or(("", &name.0));

Ok((id.to_string(), var_name.into(), value))
}
Expand Down
3 changes: 1 addition & 2 deletions crates/eww/src/window_arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ impl WindowArguments {
}

if local_variables.len() != window_def.expected_args.len() {
let unexpected_vars: Vec<_> =
local_variables.iter().map(|(name, _)| name.clone()).filter(|n| !expected_args.contains(&n.0)).collect();
let unexpected_vars: Vec<_> = local_variables.keys().cloned().filter(|n| !expected_args.contains(&n.0)).collect();
bail!(
"variables {} unexpectedly defined when creating window with id '{}'",
unexpected_vars.join(", "),
Expand Down

0 comments on commit 80441ce

Please sign in to comment.