aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-06-09 19:47:36 +0200
committerHarald Eilertsen <haraldei@anduin.net>2019-06-09 19:47:36 +0200
commiteed9d6ee002e1ad034b3db7057b5a0f8338a736a (patch)
tree979674a5e0ec0dda1f9c515278ca15aa06e7b7df
parent30e648412c33df5f26a951d5f11b9d602a0da149 (diff)
downloadrust-zotapi-eed9d6ee002e1ad034b3db7057b5a0f8338a736a.tar.gz
rust-zotapi-eed9d6ee002e1ad034b3db7057b5a0f8338a736a.tar.bz2
rust-zotapi-eed9d6ee002e1ad034b3db7057b5a0f8338a736a.zip
Use rust edition 2018.
-rw-r--r--Cargo.toml1
-rw-r--r--src/abconfig.rs6
-rw-r--r--src/abook.rs6
-rw-r--r--src/client.rs12
-rw-r--r--src/item.rs6
-rw-r--r--src/xchan.rs6
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 <https://www.gnu.org/licenses/>.
-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 <https://www.gnu.org/licenses/>.
-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 <https://www.gnu.org/licenses/>.
-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 <https://www.gnu.org/licenses/>.
-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 <https://www.gnu.org/licenses/>.
-use client::{self, Client};
-use error::Error;
+use crate::{
+ client::{self, Client},
+ error::Error,
+};
use serde::{Serialize, Serializer};
enum XChanSelector<'a> {