Skip to content

Commit 932fb75

Browse files
committed
Remove unnecessary to_owned
Signed-off-by: Ryan Bottriell <[email protected]>
1 parent 8215ea6 commit 932fb75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/spk-schema/src/build_spec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl AutoHostVars {
8686
distro_name = distro.clone();
8787
match OptName::new(&distro_name) {
8888
Ok(name) => {
89-
let mut var_opt = VarOpt::new(name.to_owned())?;
89+
let mut var_opt = VarOpt::new(name)?;
9090
// Look for any configured compat rules for the
9191
// distro
9292
let config = get_config()?;
@@ -118,7 +118,7 @@ impl AutoHostVars {
118118
"No distro name set by host. A {}= will be used instead.",
119119
OptName::unknown_distro()
120120
);
121-
settings.push(Opt::Var(VarOpt::new(OptName::unknown_distro().to_owned())?));
121+
settings.push(Opt::Var(VarOpt::new(OptName::unknown_distro())?));
122122
}
123123
}
124124
}

0 commit comments

Comments
 (0)