summary refs log tree commit diff stats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0e14d97..2407115 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -15,6 +15,14 @@
  * You should have received a copy of the GNU Affero General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
+#![warn(rust_2018_idioms)]
+#![cfg_attr(not(feature = "stable"), feature(label_break_value))]
+
+extern crate boolinator;
+extern crate regex;
+
+#[cfg(test)]
+extern crate proptest;
 
 pub mod errors;
 mod parser;
@@ -25,6 +33,7 @@ pub use pattern::Pattern;
 
 // TODO replace with GATs
 /// A borrowed or owned value of various types.
+#[derive(Debug)]
 pub enum RefOwn<'b, T: ?Sized, U> {
     /// Borrowed T.
     Ref(&'b T),
@@ -93,6 +102,7 @@ pub trait PatternTypes {
         item: RefOwn<'b, Self::Ref, Self::Own>
     ) -> Option<Box<dyn Iterator<Item=KVPair<'b, Self>> + 'b>> {
         // TODO remove these default impls that only exist for testing purposes
+        let _ = item;
         let x = None;
         Some(Box::new(x.into_iter()))
     }
@@ -104,6 +114,8 @@ pub trait PatternTypes {
         key: RefOwn<'a, Self::Ref, Self::Own>
     ) -> Option<Option<KVPair<'b, Self>>> {
         // TODO remove these default impls that only exist for testing purposes
+        let _ = item;
+        let _ = key;
         Some(None)
     }
 
@@ -118,4 +130,4 @@ pub trait PatternTypes {
 }
 
 // TODO
-type Predicate<T> = dyn (Fn(RefOwn<<T as PatternTypes>::Ref, <T as PatternTypes>::Own>) -> bool) + Send + Sync;
+pub type Predicate<T> = dyn (Fn(RefOwn<'_, <T as PatternTypes>::Ref, <T as PatternTypes>::Own>) -> bool) + Send + Sync;