Skip to content

Commit

Permalink
Remove arbitrarily defined limits on take_while (clojure's read-strin…
Browse files Browse the repository at this point in the history
…g doesn't have this limitation).
  • Loading branch information
Grinkers committed Dec 15, 2023
1 parent be8f66a commit 871abb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/deserialize/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn read_symbol(
let c_len = chars
.clone()
.enumerate()
.take_while(|&(i, c)| i <= 200 && !c.1.is_whitespace() && !DELIMITERS.contains(&c.1))
.take_while(|&(_, c)| !c.1.is_whitespace() && !DELIMITERS.contains(&c.1))
.count();
let i = chars
.clone()
Expand Down Expand Up @@ -278,7 +278,7 @@ fn read_char(chars: &mut std::iter::Enumerate<std::str::Chars<'_>>) -> Result<Ed
let element = chars
.clone()
.enumerate()
.take_while(|&(i, c)| i <= 200 && !c.1.is_whitespace())
.take_while(|&(_, c)| !c.1.is_whitespace())
.map(|(_, c)| c.1)
.collect::<String>();

Expand Down

0 comments on commit 871abb9

Please sign in to comment.