From b679f2e1fa0d513c35926759720b00004c92a49e Mon Sep 17 00:00:00 2001 From: Jan Lukas Gernert Date: Fri, 7 Dec 2018 02:19:40 +0100 Subject: [PATCH] update to rust 2018 --- Cargo.toml | 1 + src/article.rs | 2 +- src/lib.rs | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e25da6e..8c39acf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "article_scraper" version = "0.1.0" authors = ["Jan Lukas Gernert "] +edition = "2018" [dependencies] failure = "0.1" diff --git a/src/article.rs b/src/article.rs index 8934b98..329c58d 100644 --- a/src/article.rs +++ b/src/article.rs @@ -2,7 +2,7 @@ use std; use url::Url; use std::path::PathBuf; use chrono::NaiveDateTime; -use error::{ +use crate::error::{ ScraperError, ScraperErrorKind, }; diff --git a/src/lib.rs b/src/lib.rs index ffe7082..83703da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,7 +19,7 @@ mod error; mod article; pub mod images; -use article::Article; +use crate::article::Article; use libxml::parser::Parser; use libxml::xpath::Context; use libxml::tree::{ @@ -30,7 +30,7 @@ use std::path::PathBuf; use std::ops::Index; use failure::ResultExt; use std::error::Error; -use config::{ +use crate::config::{ GrabberConfig, ConfigCollection }; @@ -39,7 +39,7 @@ use encoding_rs::{ }; use chrono::NaiveDateTime; use std::str::FromStr; -use images::ImageDownloader; +use crate::images::ImageDownloader; use self::error::{ ScraperError, ScraperErrorKind @@ -686,7 +686,7 @@ impl ArticleScraper { #[cfg(test)] mod tests { - use ::*; + use crate::*; #[test] pub fn golem() {