summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorThomas Hurst <tom@hur.st>2018-09-04 21:40:18 +0100
committerKartikaya Gupta (kats) <staktrace@users.noreply.github.com>2018-09-04 21:06:35 -0400
commit80d7b5ed49cf56ba7713cfb9d091f140fa0e101f (patch)
tree500f3c99c0d9df8c2639d59b6520047bc244443c /Cargo.toml
parent03a4b80888a677a78bd0b3e0be19303a71e261f0 (diff)
Fix #26: Incorrect unwrap() guard in is_boundary()
Guarding line.chars().nth(n) by enforcing n <= line.len() is incorrect, because len() operates in bytes, not Unicode characters. Drop the guard and make use of nth()'s Option to conditionally check the character if it's within bounds. Add a test to prevent regressions.
Diffstat (limited to 'Cargo.toml')
0 files changed, 0 insertions, 0 deletions