pull/14/head
chris west 4 years ago
parent a3644a672f
commit d34a1e4352

@ -241,7 +241,7 @@ pub fn type_for_url(url: &str) -> Type {
/// Parses gopher URL into parts. /// Parses gopher URL into parts.
/// Returns (Type, host, port, sel) /// 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 url = url.trim_start_matches("gopher://");
let mut typ = Type::Menu; let mut typ = Type::Menu;
let mut host; let mut host;

@ -32,6 +32,7 @@
#![warn(deprecated_in_future)] #![warn(deprecated_in_future)]
#![warn(missing_docs)] #![warn(missing_docs)]
#![allow(clippy::while_let_on_iterator)] #![allow(clippy::while_let_on_iterator)]
#![allow(clippy::write_with_newline)]
#[macro_use] #[macro_use]
pub mod utils; pub mod utils;

@ -51,7 +51,7 @@ pub fn append(filename: &str, label: &str, url: &str) -> Result<()> {
u.sel, u.sel,
u.host, u.host,
u.port u.port
); )?;
Ok(()) Ok(())
} else { } else {
Err(error!("Can't open file for writing: {:?}", filename)) Err(error!("Can't open file for writing: {:?}", filename))

Loading…
Cancel
Save