[go: nahoru, domu]

Skip to content

Commit

Permalink
is_edit doesn't need peekable
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-harding committed Sep 1, 2023
1 parent d9c4f4e commit 8cbbf55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solutions/_01_arrays_and_strings/_05_one_away.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ impl OneAway for Solution {
}

fn is_edit(a: &str, b: &str) -> bool {
let mut a = a.chars().peekable();
let mut b = b.chars().peekable();
let mut a = a.chars();
let mut b = b.chars();
loop {
match (a.next(), b.next()) {
(None, Some(_)) | (Some(_), None) => unreachable!(),
Expand Down

0 comments on commit 8cbbf55

Please sign in to comment.