rustfmt pass

This commit is contained in:
Paul Woolcock
2018-08-25 09:13:34 -04:00
parent 1436c28e42
commit c5788b8bd5
3 changed files with 25 additions and 14 deletions
+2 -2
View File
@@ -12,8 +12,8 @@
//! use elefren::{apps::prelude::*, prelude::*};
//!
//! let registration = Registration::new("https://mastodon.social")
//! .client_name("elefren_test")
//! .register()?;
//! .client_name("elefren_test")
//! .register()?;
//! let url = registration.authorize_url()?;
//! // Here you now need to open the url in the browser
//! // And handle a the redirect url coming back with the code.
+18 -6
View File
@@ -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.
@@ -92,8 +95,8 @@ impl<'a, H: HttpSend> Registration<'a, H> {
/// use elefren::{apps::prelude::*, prelude::*};
///
/// let registration = Registration::new("https://mastodon.social")
/// .client_name("elefren_test")
/// .register()?;
/// .client_name("elefren_test")
/// .register()?;
/// let url = registration.authorize_url()?;
/// // Here you now need to open the url in the browser
/// // And handle a the redirect url coming back with the code.
@@ -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")
);
}
}