rustfmt pass

master
Paul Woolcock 6 years ago
parent 19ea7c7482
commit 043d3753e1
  1. 5
      examples/follow_profile.rs
  2. 5
      examples/print_your_profile.rs
  3. 2
      examples/register.rs
  4. 5
      examples/search.rs
  5. 5
      examples/upload_photo.rs
  6. 11
      src/errors.rs

@ -18,5 +18,8 @@ fn main() -> Result<(), Box<error::Error>> {
#[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"
);
}

@ -17,5 +17,8 @@ fn main() -> Result<(), Box<error::Error>> {
#[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"
);
}

@ -66,4 +66,4 @@ pub fn read_line(message: &str) -> Result<String, Box<Error>> {
}
#[cfg(not(feature = "toml"))]
fn main() { }
fn main() {}

@ -18,5 +18,8 @@ fn main() -> Result<(), Box<error::Error>> {
#[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"
);
}

@ -17,5 +17,8 @@ fn main() -> Result<(), Box<error::Error>> {
#[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"
);
}

@ -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(..));
}

Loading…
Cancel
Save