Skip to content

Commit

Permalink
Remove cloning mess left from Seed::new taking a String
Browse files Browse the repository at this point in the history
  • Loading branch information
itmecho committed May 27, 2020
1 parent cdaf2eb commit d4fc8f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl<'a> Seed<'a> {

let pattern = Regex::new(r"(%([a-z0-9]+):([^%]+)%)").unwrap();

for capture in pattern.captures_iter(self.template.clone().as_ref()) {
for capture in pattern.captures_iter(self.template) {
// capture[1] will be the find string. If the map contains the key then we have already
// processed this replacement
if replacements.contains_key(&capture[1].to_string()) {
Expand Down

0 comments on commit d4fc8f1

Please sign in to comment.