diff options
author | David Tolnay <dtolnay@gmail.com> | 2019-03-11 12:52:36 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2019-03-11 12:52:36 -0700 |
commit | b6cc40fa8588f2ce5f0e6351202025ffb54beeb9 (patch) | |
tree | 04cb55d5a83dbc39c9e3f183c911da05af3a65ac /src | |
parent | 8ad031581aa77bb2d73297e777745dfbf3f5e6ed (diff) | |
download | remain-b6cc40fa8588f2ce5f0e6351202025ffb54beeb9.tar.gz |
Use case insensitive comparison
Diffstat (limited to 'src')
-rw-r--r-- | src/compare.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compare.rs b/src/compare.rs index 6abc964..59f997d 100644 --- a/src/compare.rs +++ b/src/compare.rs @@ -37,6 +37,9 @@ fn cmp(lhs: &str, rhs: &str) -> Ordering { (false, false) => {} } + let lhs = lhs.to_ascii_lowercase(); + let rhs = rhs.to_ascii_lowercase(); + // For now: asciibetical ordering. - lhs.cmp(rhs) + lhs.cmp(&rhs) } |