jD91mZM2 6 tahun lalu
induk
melakukan
e88e0d77bd
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 1 1
      src/lib.rs
  2. 2 1
      src/matcher.rs

+ 1 - 1
src/lib.rs

@@ -4,7 +4,7 @@
 #![feature(nll)]
 
 #[cfg(feature = "no_std")]
-#[cfg_attr(test, macro_use)]
+#[macro_use]
 extern crate alloc;
 
 #[cfg(feature = "no_std")]

+ 2 - 1
src/matcher.rs

@@ -475,7 +475,7 @@ impl<'a> PosixRegexMatcher<'a> {
                     let mut prev = branch.prev.clone();
                     branch.push_to_prev(&mut prev);
 
-                    for &(ref key, group) in &prev {
+                    for &(_, group) in &prev {
                         self.groups.push(group);
                     }
                 }
@@ -518,6 +518,7 @@ mod tests {
             .compile()
             .expect("error compiling regex")
     }
+    #[cfg(feature = "bench")]
     fn matches(regex: &str, input: &str) -> Vec<PosixRegexResult> {
         compile(regex)
             .matches(input.as_bytes())