refactor: change range syntax for squirly brace

Before:
```rust
begin.parse::<char>().unwrap() as u8..end.parse::<char>().unwrap() as u8 + 1
```

After:
```rust
begin.parse::<char>().unwrap() as u8..=end.parse::<char>().unwrap() as u8
```

We will use ..= instead of adding + 1 to the end range as it is
the idiomatic Rust syntax.
main
Angelo Fallaria 2 years ago
parent 985598e575
commit 3ce4db7be8

@ -157,7 +157,7 @@ fn extract_curly_brace(line: &str) -> Vec<String> {
}
for i in
begin.parse::<char>().unwrap() as u8..end.parse::<char>().unwrap() as u8 + 1
begin.parse::<char>().unwrap() as u8..=end.parse::<char>().unwrap() as u8
{
output
.push(format!("{}{}{}", before_curly_brace, i as char, after_curly_brace));

Loading…
Cancel
Save