summaryrefslogtreecommitdiff
path: root/src/step.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/step.rs')
-rw-r--r--src/step.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/step.rs b/src/step.rs
index a37f23c..6088400 100644
--- a/src/step.rs
+++ b/src/step.rs
@@ -45,8 +45,8 @@ impl Step {
}
/// Return vector of names of dependencies for a step.
- pub fn dependencies(&self) -> impl Iterator<Item = &String> {
- self.depends.iter()
+ pub fn dependencies(&self) -> impl Iterator<Item = &str> {
+ self.depends.iter().map(|s| s.as_str())
}
/// Add the name of a dependency to step. Steps are referred by
@@ -86,7 +86,7 @@ mod tests {
fn add_step_dependency() {
let mut second = Step::new("second", "the second step");
second.add_dependency("first");
- let deps: Vec<&String> = second.dependencies().collect();
+ let deps: Vec<&str> = second.dependencies().collect();
assert_eq!(deps, vec!["first"]);
}
}