# HG changeset patch # User Yuya Nishihara # Date 1560562553 -32400 # Node ID a4a468b00d44c38644a127572fad752dc09b9893 # Parent cc4db44784679e5e7015eff2bb6da5b104dd9376 rust-filepatterns: silence warning of non_upper_case_globals diff -r cc4db4478467 -r a4a468b00d44 rust/hg-core/src/filepatterns.rs --- a/rust/hg-core/src/filepatterns.rs Sat Jun 15 10:35:03 2019 +0900 +++ b/rust/hg-core/src/filepatterns.rs Sat Jun 15 10:35:53 2019 +0900 @@ -8,7 +8,7 @@ use utils::{replace_slice, SliceExt}; lazy_static! { - static ref reescape: Vec> = { + static ref RE_ESCAPE: Vec> = { let mut v: Vec> = (0..=255).map(|byte| vec![byte]).collect(); let to_escape = b"()[]{}?*+-|^$\\.&~# \t\n\r\x0b\x0c"; for byte in to_escape { @@ -99,9 +99,9 @@ c } }; - res.extend(&reescape[*c as usize]) + res.extend(&RE_ESCAPE[*c as usize]) } - _ => res.extend(&reescape[*c as usize]), + _ => res.extend(&RE_ESCAPE[*c as usize]), } } res @@ -110,7 +110,7 @@ fn escape_pattern(pattern: &[u8]) -> Vec { pattern .iter() - .flat_map(|c| reescape[*c as usize].clone()) + .flat_map(|c| RE_ESCAPE[*c as usize].clone()) .collect() }