From d605f923bb005869341ddba05ab9ab7db9997328 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 27 Aug 2019 10:28:27 +0200 Subject: [PATCH] [No-auto] lib/entry/url: Fix Clippy warnings Signed-off-by: flip1995 Signed-off-by: Matthias Beyer --- lib/entry/libimagentryurl/src/iter.rs | 2 +- lib/entry/libimagentryurl/src/link.rs | 2 +- lib/entry/libimagentryurl/src/linker.rs | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/entry/libimagentryurl/src/iter.rs b/lib/entry/libimagentryurl/src/iter.rs index ddec1d6c..4a22a6b1 100644 --- a/lib/entry/libimagentryurl/src/iter.rs +++ b/lib/entry/libimagentryurl/src/iter.rs @@ -98,7 +98,7 @@ impl OnlyUrlIter { OnlyUrlIter(UrlFilterIter(li, true)) } - pub fn urls<'a>(self, store: &'a Store) -> UrlIter<'a> { + pub fn urls(self, store: &Store) -> UrlIter<'_> { UrlIter(self, store) } } diff --git a/lib/entry/libimagentryurl/src/link.rs b/lib/entry/libimagentryurl/src/link.rs index 286367d5..1c40cd5a 100644 --- a/lib/entry/libimagentryurl/src/link.rs +++ b/lib/entry/libimagentryurl/src/link.rs @@ -136,7 +136,7 @@ mod tests { match url { Value::String(ref s) => assert_eq!("http://google.de/", s), - _ => assert!(false), + _ => panic!(), } } diff --git a/lib/entry/libimagentryurl/src/linker.rs b/lib/entry/libimagentryurl/src/linker.rs index 703ccabc..175ffcea 100644 --- a/lib/entry/libimagentryurl/src/linker.rs +++ b/lib/entry/libimagentryurl/src/linker.rs @@ -207,12 +207,10 @@ mod tests { let link = match link_entry.get_header().read_string("url.uri") { Ok(Some(s)) => s, Ok(None) => { - assert!(false); unreachable!() }, Err(e) => { error!("{:?}", e); - assert!(false); unreachable!() }, }; @@ -236,7 +234,6 @@ mod tests { let urls = match urls { Err(e) => { debug!("Error: {:?}", e); - assert!(false); unreachable!() }, Ok(urls) => urls.collect::>(),