diff --git a/src/gopher.rs b/src/gopher.rs index c5fbd2b..9ff9810 100644 --- a/src/gopher.rs +++ b/src/gopher.rs @@ -241,7 +241,7 @@ pub fn type_for_url(url: &str) -> Type { /// Parses gopher URL into parts. /// Returns (Type, host, port, sel) -pub fn parse_url<'a>(url: &'a str) -> Url<'a> { +pub fn parse_url(url: &str) -> Url { let mut url = url.trim_start_matches("gopher://"); let mut typ = Type::Menu; let mut host; diff --git a/src/lib.rs b/src/lib.rs index 4647514..86dd02c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,6 +32,7 @@ #![warn(deprecated_in_future)] #![warn(missing_docs)] #![allow(clippy::while_let_on_iterator)] +#![allow(clippy::write_with_newline)] #[macro_use] pub mod utils; diff --git a/src/phetchdir.rs b/src/phetchdir.rs index 9b4d957..a6ccf2d 100644 --- a/src/phetchdir.rs +++ b/src/phetchdir.rs @@ -51,7 +51,7 @@ pub fn append(filename: &str, label: &str, url: &str) -> Result<()> { u.sel, u.host, u.port - ); + )?; Ok(()) } else { Err(error!("Can't open file for writing: {:?}", filename))