From eed9d6ee002e1ad034b3db7057b5a0f8338a736a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 9 Jun 2019 19:47:36 +0200 Subject: Use rust edition 2018. --- Cargo.toml | 1 + src/abconfig.rs | 6 ++++-- src/abook.rs | 6 ++++-- src/client.rs | 12 +++++++----- src/item.rs | 6 ++++-- src/xchan.rs | 6 ++++-- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 003b23a..4a6d634 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ name = "zotapi" version = "0.1.0" authors = ["haraldei"] +edition = "2018" [dependencies] reqwest = "0.9.1" diff --git a/src/abconfig.rs b/src/abconfig.rs index 92b8161..78eec4b 100644 --- a/src/abconfig.rs +++ b/src/abconfig.rs @@ -14,8 +14,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use client::{self, Client}; -use error::Error; +use crate::{ + client::{self, Client}, + error::Error, +}; pub struct ABConfigFetcher<'a> { client: &'a Client, diff --git a/src/abook.rs b/src/abook.rs index 663446f..f7469e3 100644 --- a/src/abook.rs +++ b/src/abook.rs @@ -14,8 +14,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use client::{self, Client}; -use error::Error; +use crate::{ + client::{self, Client}, + error::Error, +}; pub struct AbookFetcher<'a> { client: &'a Client, diff --git a/src/client.rs b/src/client.rs index 3dbca36..138b80c 100644 --- a/src/client.rs +++ b/src/client.rs @@ -14,8 +14,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use error::Error; -use item::ItemBuilder; +use crate::{ + error::Error, + item::ItemBuilder, + abook::AbookFetcher, + abconfig::ABConfigFetcher, + xchan::XChanFetcher, +}; use reqwest::{ self, header::{ACCEPT, CONTENT_TYPE}, @@ -25,9 +30,6 @@ use serde::Serialize; use serde_urlencoded; use std::collections::BTreeMap; use std::io::Read; -use abook::AbookFetcher; -use abconfig::ABConfigFetcher; -use xchan::XChanFetcher; pub const ZOTAPI_ABOOK_PATH : &str = "/api/z/1.0/abook"; pub const ZOTAPI_ABCONFIG_PATH : &str = "/api/z/1.0/abconfig"; diff --git a/src/item.rs b/src/item.rs index 326e4e8..7ea8c18 100644 --- a/src/item.rs +++ b/src/item.rs @@ -14,8 +14,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use client::{self, Client}; -use error::Error; +use crate::{ + client::{self, Client}, + error::Error, +}; use std::collections::BTreeMap; pub struct ItemBuilder<'a> { diff --git a/src/xchan.rs b/src/xchan.rs index d81758a..c67179c 100644 --- a/src/xchan.rs +++ b/src/xchan.rs @@ -14,8 +14,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use client::{self, Client}; -use error::Error; +use crate::{ + client::{self, Client}, + error::Error, +}; use serde::{Serialize, Serializer}; enum XChanSelector<'a> { -- cgit v1.2.3