From 862a3b67d701b3c124e1b682db0cee5fc5b711da Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Fri, 3 Jan 2020 23:53:24 +0100 Subject: Cargo fmt --- src/abconfig.rs | 5 +---- src/abook.rs | 6 +----- src/channel_stream.rs | 5 +---- src/client.rs | 3 +-- src/group.rs | 7 ++----- src/item.rs | 5 +---- src/network_stream.rs | 5 +---- src/xchan.rs | 5 +---- tests/zotapi.rs | 4 +--- 9 files changed, 10 insertions(+), 35 deletions(-) diff --git a/src/abconfig.rs b/src/abconfig.rs index 36b3427..7957dea 100644 --- a/src/abconfig.rs +++ b/src/abconfig.rs @@ -14,10 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::{ - client::Client, - error::Error, -}; +use crate::{client::Client, error::Error}; pub struct ABConfig; diff --git a/src/abook.rs b/src/abook.rs index 40ef5a4..8423872 100644 --- a/src/abook.rs +++ b/src/abook.rs @@ -14,11 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::{ - client::Client, - error::Error, -}; - +use crate::{client::Client, error::Error}; pub struct Abook; diff --git a/src/channel_stream.rs b/src/channel_stream.rs index f99ca1c..49f51e7 100644 --- a/src/channel_stream.rs +++ b/src/channel_stream.rs @@ -15,10 +15,7 @@ * along with this program. If not, see . */ -use crate::{ - client::Client, - error::Error, -}; +use crate::{client::Client, error::Error}; pub struct ChannelStream; diff --git a/src/client.rs b/src/client.rs index d37133f..5381286 100644 --- a/src/client.rs +++ b/src/client.rs @@ -47,8 +47,7 @@ impl Client { where T: Serialize + std::fmt::Debug, { - let mut r = self.base_url.clone() - .join(path).unwrap(); + let mut r = self.base_url.clone().join(path).unwrap(); if let Ok(a) = serde_qs::to_string(dbg!(args)) { r.set_query(Some(&a)); diff --git a/src/group.rs b/src/group.rs index e17addb..2ed8e92 100644 --- a/src/group.rs +++ b/src/group.rs @@ -14,16 +14,13 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::{ - client::Client, - error::Error, -}; +use crate::{client::Client, error::Error}; use serde::Serialize; pub struct Group; pub fn group() -> Group { - Group { } + Group {} } impl Group { diff --git a/src/item.rs b/src/item.rs index 846c674..cc0c143 100644 --- a/src/item.rs +++ b/src/item.rs @@ -14,10 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::{ - client::Client, - error::Error, -}; +use crate::{client::Client, error::Error}; use serde::Serialize; use std::collections::BTreeMap; diff --git a/src/network_stream.rs b/src/network_stream.rs index 48a04a7..8204458 100644 --- a/src/network_stream.rs +++ b/src/network_stream.rs @@ -15,10 +15,7 @@ * along with this program. If not, see . */ -use crate::{ - client::Client, - error::Error, -}; +use crate::{client::Client, error::Error}; pub struct NetworkStream; diff --git a/src/xchan.rs b/src/xchan.rs index 20bbe8d..2e42c39 100644 --- a/src/xchan.rs +++ b/src/xchan.rs @@ -14,10 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::{ - client::Client, - error::Error, -}; +use crate::{client::Client, error::Error}; //use serde::{Serialize, Serializer}; use serde::Serialize; diff --git a/tests/zotapi.rs b/tests/zotapi.rs index e22ba30..1621af1 100644 --- a/tests/zotapi.rs +++ b/tests/zotapi.rs @@ -74,9 +74,7 @@ fn create_new_post() { .with_body("{}") .create(); - let _res = zotapi::item() - .body("This is a test") - .create(&client()); + let _res = zotapi::item().body("This is a test").create(&client()); m.assert(); } -- cgit v1.2.3