rustfmt pass

master
Paul Woolcock 6 years ago
parent 1436c28e42
commit c5788b8bd5
  1. 3
      examples/register.rs
  2. 20
      src/registration.rs

@ -2,8 +2,7 @@
#![cfg_attr(not(feature = "toml"), allow(unused_imports))]
extern crate elefren;
pub use self::elefren::prelude::*;
pub use self::elefren::apps::prelude::*;
pub use self::elefren::{apps::prelude::*, prelude::*};
use std::{error::Error, io};

@ -4,7 +4,10 @@ use reqwest::{Client, RequestBuilder, Response};
use apps::{App, AppBuilder, Scopes};
use http_send::{HttpSend, HttpSender};
use {Data, Mastodon, MastodonBuilder, Result};
use Data;
use Mastodon;
use MastodonBuilder;
use Result;
/// Handles registering your mastodon app to your instance. It is recommended
/// you cache your data struct to avoid registering on every run.
@ -192,7 +195,10 @@ mod tests {
r.client_name("foo-test");
assert_eq!(r.base, "https://example.com".to_string());
assert_eq!(&mut r.app_builder, AppBuilder::new().client_name("foo-test"));
assert_eq!(
&mut r.app_builder,
AppBuilder::new().client_name("foo-test")
);
}
#[test]
@ -201,7 +207,10 @@ mod tests {
r.redirect_uris("https://foo.com");
assert_eq!(r.base, "https://example.com".to_string());
assert_eq!(&mut r.app_builder, AppBuilder::new().redirect_uris("https://foo.com"));
assert_eq!(
&mut r.app_builder,
AppBuilder::new().redirect_uris("https://foo.com")
);
}
#[test]
@ -219,6 +228,9 @@ mod tests {
r.website("https://website.example.com");
assert_eq!(r.base, "https://example.com".to_string());
assert_eq!(&mut r.app_builder, AppBuilder::new().website("https://website.example.com"));
assert_eq!(
&mut r.app_builder,
AppBuilder::new().website("https://website.example.com")
);
}
}

Loading…
Cancel
Save