Skip to content

Commit

Permalink
test: Remove extraneous to_owned's
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 23, 2023
1 parent 098a700 commit 3591dc7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/parser/features/suggestions.rs
Expand Up @@ -79,16 +79,13 @@ mod test {
#[test]
fn missing_letter() {
let p_vals = ["test", "possible", "values"];
assert_eq!(did_you_mean("tst", p_vals.iter()), vec!["test".to_owned()]);
assert_eq!(did_you_mean("tst", p_vals.iter()), vec!["test"]);
}

#[test]
fn ambiguous() {
let p_vals = ["test", "temp", "possible", "values"];
assert_eq!(
did_you_mean("te", p_vals.iter()),
vec!["test".to_owned(), "temp".to_owned()]
);
assert_eq!(did_you_mean("te", p_vals.iter()), vec!["test", "temp"]);
}

#[test]
Expand All @@ -111,7 +108,7 @@ mod test {
];
assert_eq!(
did_you_mean("alignmentScorr", p_vals.iter()),
vec!["alignmentStart".to_owned(), "alignmentScore".to_owned()]
vec!["alignmentStart", "alignmentScore"]
);
}

Expand Down

0 comments on commit 3591dc7

Please sign in to comment.