From d8412865f7ee35663ee04e8cddff4d3f4bc846cb Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Tue, 5 Oct 2021 22:05:37 +0200 Subject: [PATCH] fix(clipboard): fix warnings --- espanso-clipboard/src/win32/mod.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/espanso-clipboard/src/win32/mod.rs b/espanso-clipboard/src/win32/mod.rs index 98831cb..c4a3143 100644 --- a/espanso-clipboard/src/win32/mod.rs +++ b/espanso-clipboard/src/win32/mod.rs @@ -97,18 +97,20 @@ fn generate_html_descriptor(html: &str) -> String { // For more information, look here: // https://docs.microsoft.com/en-us/windows/win32/dataxchg/html-clipboard-format // https://docs.microsoft.com/en-za/troubleshoot/cpp/add-html-code-clipboard - let mut tokens = Vec::new(); - tokens.push("Version:0.9"); - tokens.push("StartHTML:<"); - tokens.push("EndHTML:<"); - tokens.push("StartFragment:<"); - tokens.push("EndFragment:<"); - tokens.push(""); - tokens.push(""); let content = format!("{}", html); - tokens.push(&content); - tokens.push(""); - tokens.push(""); + + let tokens = vec![ + "Version:0.9", + "StartHTML:<", + "EndHTML:<", + "StartFragment:<", + "EndFragment:<", + "", + "", + &content, + "", + "", + ]; let mut render = tokens.join("\r\n");