diff --git a/crates/eww/src/opts.rs b/crates/eww/src/opts.rs index 39420fbd..526aa3c7 100644 --- a/crates/eww/src/opts.rs +++ b/crates/eww/src/opts.rs @@ -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)) } diff --git a/crates/eww/src/window_arguments.rs b/crates/eww/src/window_arguments.rs index 029bd924..8833bac9 100644 --- a/crates/eww/src/window_arguments.rs +++ b/crates/eww/src/window_arguments.rs @@ -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(", "),