# HG changeset patch # User Yuya Nishihara # Date 2019-07-21 04:00:54 # Node ID 30f8e786868c411a633dc834dfa31b1c3ed2d19e # Parent 0247601869bab02690d9da40daf2811c33a7f02d rust-filepatterns: use literal b'#' instead of cast diff --git a/rust/hg-core/src/filepatterns.rs b/rust/hg-core/src/filepatterns.rs --- a/rust/hg-core/src/filepatterns.rs +++ b/rust/hg-core/src/filepatterns.rs @@ -243,7 +243,7 @@ pub fn parse_pattern_file_contents( 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()] }