From 043d3753e15cc9dc56cc604df26f3ad92f9ebecc Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Fri, 24 Aug 2018 11:55:07 -0400 Subject: [PATCH] rustfmt pass --- examples/follow_profile.rs | 5 ++++- examples/print_your_profile.rs | 5 ++++- examples/register.rs | 2 +- examples/search.rs | 5 ++++- examples/upload_photo.rs | 5 ++++- src/errors.rs | 11 +++++++---- 6 files changed, 24 insertions(+), 9 deletions(-) diff --git a/examples/follow_profile.rs b/examples/follow_profile.rs index f6fb468..ba0b8c3 100644 --- a/examples/follow_profile.rs +++ b/examples/follow_profile.rs @@ -18,5 +18,8 @@ fn main() -> Result<(), Box> { #[cfg(not(feature = "toml"))] fn main() { - println!("examples require the `toml` feature, run this command for this example:\n\ncargo run --example follow_profile --features toml\n"); + println!( + "examples require the `toml` feature, run this command for this example:\n\ncargo run \ + --example follow_profile --features toml\n" + ); } diff --git a/examples/print_your_profile.rs b/examples/print_your_profile.rs index 4608233..5492648 100644 --- a/examples/print_your_profile.rs +++ b/examples/print_your_profile.rs @@ -17,5 +17,8 @@ fn main() -> Result<(), Box> { #[cfg(not(feature = "toml"))] fn main() { - println!("examples require the `toml` feature, run this command for this example:\n\ncargo run --example print_your_profile --features toml\n"); + println!( + "examples require the `toml` feature, run this command for this example:\n\ncargo run \ + --example print_your_profile --features toml\n" + ); } diff --git a/examples/register.rs b/examples/register.rs index cfa846d..052cf71 100644 --- a/examples/register.rs +++ b/examples/register.rs @@ -66,4 +66,4 @@ pub fn read_line(message: &str) -> Result> { } #[cfg(not(feature = "toml"))] -fn main() { } +fn main() {} diff --git a/examples/search.rs b/examples/search.rs index 4210c2a..7eb5c13 100644 --- a/examples/search.rs +++ b/examples/search.rs @@ -18,5 +18,8 @@ fn main() -> Result<(), Box> { #[cfg(not(feature = "toml"))] fn main() { - println!("examples require the `toml` feature, run this command for this example:\n\ncargo run --example search --features toml\n"); + println!( + "examples require the `toml` feature, run this command for this example:\n\ncargo run \ + --example search --features toml\n" + ); } diff --git a/examples/upload_photo.rs b/examples/upload_photo.rs index b761a24..f75df7d 100644 --- a/examples/upload_photo.rs +++ b/examples/upload_photo.rs @@ -17,5 +17,8 @@ fn main() -> Result<(), Box> { #[cfg(not(feature = "toml"))] fn main() { - println!("examples require the `toml` feature, run this command for this example:\n\ncargo run --example upload_photo --features toml\n"); + println!( + "examples require the `toml` feature, run this command for this example:\n\ncargo run \ + --example upload_photo --features toml\n" + ); } diff --git a/src/errors.rs b/src/errors.rs index 75d8596..5dee679 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -119,9 +119,9 @@ from! { #[cfg(test)] mod tests { use super::*; - use std::io; - use reqwest; use json; + use reqwest; + use std::io; macro_rules! assert_is { ($err:ident, $variant:pat) => { @@ -129,7 +129,7 @@ mod tests { $variant => true, _ => false, }); - } + }; } #[test] @@ -162,7 +162,10 @@ mod tests { #[test] fn from_api_error() { - let err: ApiError = ApiError { error: None, error_description: None }; + let err: ApiError = ApiError { + error: None, + error_description: None, + }; let err: Error = Error::from(err); assert_is!(err, Error::Api(..)); }