From c04ab5b326bbe41a7760ffd893174b046816dfc9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 4 Oct 2019 10:43:44 +0300 Subject: Refactor: more idiomatic way of creating string from slice --- src/step.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/step.rs b/src/step.rs index 6088400..4012da7 100644 --- a/src/step.rs +++ b/src/step.rs @@ -53,7 +53,7 @@ impl Step { /// name. Steps don't know about other steps, and can't validate /// that the dependency exists, so this always works. pub fn add_dependency(&mut self, name: &str) { - self.depends.push(String::from(name)); + self.depends.push(name.to_owned()); } /// Does this step depend on given other step? -- cgit v1.2.1