Fix "no need for reference" clippy 1.81 lints

pull/321/head
Matěj Laitl 2024-09-13 10:16:59 +02:00
parent 70e36369b4
commit 7d8617b285
3 changed files with 5 additions and 5 deletions

View File

@ -290,7 +290,7 @@ fn update_hosts_file(
for peer in peers {
hosts_builder.add_hostname(
peer.contents.ip,
&format!("{}.{}.wg", peer.contents.name, interface),
format!("{}.{}.wg", peer.contents.name, interface),
);
}
match hosts_builder.write_to(&hosts_path).with_path(&hosts_path) {
@ -374,7 +374,7 @@ fn install(
if install_opts.delete_invite
|| Confirm::with_theme(&*prompts::THEME)
.wait_for_newline(true)
.with_prompt(&format!(
.with_prompt(format!(
"Delete invitation file \"{}\" now? (It's no longer needed)",
invite.to_string_lossy().yellow()
))
@ -666,7 +666,7 @@ fn uninstall(interface: &InterfaceName, opts: &Opts, yes: bool) -> Result<(), Er
if yes
|| Confirm::with_theme(&*prompts::THEME)
.with_prompt(&format!(
.with_prompt(format!(
"Permanently delete network \"{}\"?",
interface.as_str_lossy().yellow()
))

View File

@ -522,7 +522,7 @@ fn uninstall(
) -> Result<(), Error> {
if yes
|| Confirm::with_theme(&*prompts::THEME)
.with_prompt(&format!(
.with_prompt(format!(
"Permanently delete network \"{}\"?",
interface.as_str_lossy().yellow()
))

View File

@ -278,7 +278,7 @@ fn start_userspace_wireguard(iface: &InterfaceName) -> io::Result<Output> {
command.args(&[iface.to_string()]).output()?
} else {
command
.env("WG_TUN_NAME_FILE", &format!("{VAR_RUN_PATH}/{iface}.name"))
.env("WG_TUN_NAME_FILE", format!("{VAR_RUN_PATH}/{iface}.name"))
.args(["utun"])
.output()?
};