From daa88e5bcbd63d2f32bc070223a239e8b0a776d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Katona?= Date: Sun, 31 Jul 2022 17:24:10 -0700 Subject: [PATCH] remove useless string allocation --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index d7871e7..fc992fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,8 +55,7 @@ fn parse_args() -> Cli { // running with cargo vcs causes the vcs arg to be sent along // we need to unhack this for Clap let mut all_args: Vec = std::env::args_os().collect(); - let vcsstr = String::from("vcs"); - let osvcsstr = OsString::from(vcsstr); + let osvcsstr = OsString::from("vcs"); if all_args.get(1) == Some(&osvcsstr) { all_args.remove(1); }