Upgrade rust/crates/regex to 1.5.4
Test: make
Change-Id: I0eab39246dc2aea41a62c15661e350b490f06c1d
diff --git a/src/input.rs b/src/input.rs
index 3afa2d0..5d50ee3 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -4,11 +4,9 @@
use std::ops;
use std::u32;
-use syntax;
-
-use literal::LiteralSearcher;
-use prog::InstEmptyLook;
-use utf8::{decode_last_utf8, decode_utf8};
+use crate::literal::LiteralSearcher;
+use crate::prog::InstEmptyLook;
+use crate::utf8::{decode_last_utf8, decode_utf8};
/// Represents a location in the input.
#[derive(Clone, Copy, Debug)]
@@ -175,7 +173,7 @@
}
fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool {
- use prog::EmptyLook::*;
+ use crate::prog::EmptyLook::*;
match empty.look {
StartLine => {
let c = self.previous_char(at);
@@ -268,7 +266,7 @@
}
fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool {
- use prog::EmptyLook::*;
+ use crate::prog::EmptyLook::*;
match empty.look {
StartLine => {
let c = self.previous_char(at);
@@ -348,7 +346,7 @@
pub struct Char(u32);
impl fmt::Debug for Char {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match char::from_u32(self.0) {
None => write!(f, "Empty"),
Some(c) => write!(f, "{:?}", c),
@@ -379,7 +377,7 @@
// available. However, our compiler ensures that if a Unicode word
// boundary is used, then the data must also be available. If it isn't,
// then the compiler returns an error.
- char::from_u32(self.0).map_or(false, syntax::is_word_character)
+ char::from_u32(self.0).map_or(false, regex_syntax::is_word_character)
}
/// Returns true iff the byte is a word byte.
@@ -387,7 +385,7 @@
/// If the byte is absent, then false is returned.
pub fn is_word_byte(self) -> bool {
match char::from_u32(self.0) {
- Some(c) if c <= '\u{7F}' => syntax::is_word_byte(c as u8),
+ Some(c) if c <= '\u{7F}' => regex_syntax::is_word_byte(c as u8),
None | Some(_) => false,
}
}