Skip to content
This repository was archived by the owner on Jul 26, 2024. It is now read-only.

Commit 036e091

Browse files
committed
fix build error due to clippy warning (to_owned -> clone_into)
1 parent 5d6efb6 commit 036e091

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

directives/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl Directives {
122122

123123
pub fn maybe_override_build_command(&mut self, maybe_new: &Option<String>) {
124124
if maybe_new.is_some() {
125-
self.build_command = maybe_new.to_owned()
125+
maybe_new.clone_into(&mut self.build_command)
126126
}
127127
}
128128

@@ -140,7 +140,7 @@ impl Directives {
140140

141141
pub fn maybe_override_interpreter(&mut self, maybe_new: &Option<String>) {
142142
if maybe_new.is_some() {
143-
self.interpreter = maybe_new.to_owned()
143+
maybe_new.clone_into(&mut self.interpreter)
144144
}
145145
}
146146

0 commit comments

Comments
 (0)