changeset 42635:30f8e786868c

rust-filepatterns: use literal b'#' instead of cast
author Yuya Nishihara <yuya@tcha.org>
date Sun, 21 Jul 2019 13:00:54 +0900
parents 0247601869ba
children 12addcc7956c
files rust/hg-core/src/filepatterns.rs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/filepatterns.rs	Sun Jul 21 12:46:57 2019 +0900
+++ b/rust/hg-core/src/filepatterns.rs	Sun Jul 21 13:00:54 2019 +0900
@@ -243,7 +243,7 @@
     for (line_number, mut line) in lines.split(|c| *c == b'\n').enumerate() {
         let line_number = line_number + 1;
 
-        if line.contains(&('#' as u8)) {
+        if line.contains(&b'#') {
             if let Some(cap) = comment_regex.captures(line) {
                 line = &line[..cap.get(1).unwrap().end()]
             }