mirror of
https://gitlab.com/news-flash/article_scraper.git
synced 2025-07-07 16:15:32 +02:00
update to rust 2018
This commit is contained in:
parent
6f38c2bc4c
commit
b679f2e1fa
3 changed files with 6 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
||||||
name = "article_scraper"
|
name = "article_scraper"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Jan Lukas Gernert <jangernert@gmail.com>"]
|
authors = ["Jan Lukas Gernert <jangernert@gmail.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
|
|
|
@ -2,7 +2,7 @@ use std;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use chrono::NaiveDateTime;
|
use chrono::NaiveDateTime;
|
||||||
use error::{
|
use crate::error::{
|
||||||
ScraperError,
|
ScraperError,
|
||||||
ScraperErrorKind,
|
ScraperErrorKind,
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,7 @@ mod error;
|
||||||
mod article;
|
mod article;
|
||||||
pub mod images;
|
pub mod images;
|
||||||
|
|
||||||
use article::Article;
|
use crate::article::Article;
|
||||||
use libxml::parser::Parser;
|
use libxml::parser::Parser;
|
||||||
use libxml::xpath::Context;
|
use libxml::xpath::Context;
|
||||||
use libxml::tree::{
|
use libxml::tree::{
|
||||||
|
@ -30,7 +30,7 @@ use std::path::PathBuf;
|
||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
use failure::ResultExt;
|
use failure::ResultExt;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use config::{
|
use crate::config::{
|
||||||
GrabberConfig,
|
GrabberConfig,
|
||||||
ConfigCollection
|
ConfigCollection
|
||||||
};
|
};
|
||||||
|
@ -39,7 +39,7 @@ use encoding_rs::{
|
||||||
};
|
};
|
||||||
use chrono::NaiveDateTime;
|
use chrono::NaiveDateTime;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use images::ImageDownloader;
|
use crate::images::ImageDownloader;
|
||||||
use self::error::{
|
use self::error::{
|
||||||
ScraperError,
|
ScraperError,
|
||||||
ScraperErrorKind
|
ScraperErrorKind
|
||||||
|
@ -686,7 +686,7 @@ impl ArticleScraper {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use ::*;
|
use crate::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn golem() {
|
pub fn golem() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue