diff --git a/core/src/authentication.rs b/core/src/authentication.rs index 2992abc..db787bb 100644 --- a/core/src/authentication.rs +++ b/core/src/authentication.rs @@ -31,13 +31,10 @@ impl Credentials { /// ### Example /// ```rust /// use librespot_core::authentication::Credentials; - /// + /// /// let creds = Credentials::with_password("my account", "my password"); /// ``` - pub fn with_password( - username: impl Into, - password: impl Into, - ) -> Credentials { + pub fn with_password(username: impl Into, password: impl Into) -> Credentials { Credentials { username: username.into(), auth_type: AuthenticationType::AUTHENTICATION_USER_PASS, diff --git a/examples/get_token.rs b/examples/get_token.rs index 15b97bc..636155e 100644 --- a/examples/get_token.rs +++ b/examples/get_token.rs @@ -20,7 +20,9 @@ async fn main() { println!("Connecting.."); let credentials = Credentials::with_password(&args[1], &args[2]); - let session = Session::connect(session_config, credentials, None).await.unwrap(); + let session = Session::connect(session_config, credentials, None) + .await + .unwrap(); println!( "Token: {:#?}", diff --git a/examples/play.rs b/examples/play.rs index 9b1988a..b4f2b68 100644 --- a/examples/play.rs +++ b/examples/play.rs @@ -4,8 +4,8 @@ use librespot::core::authentication::Credentials; use librespot::core::config::SessionConfig; use librespot::core::session::Session; use librespot::core::spotify_id::SpotifyId; -use librespot::playback::config::PlayerConfig; use librespot::playback::audio_backend; +use librespot::playback::config::PlayerConfig; use librespot::playback::player::Player; #[tokio::main] @@ -25,11 +25,11 @@ async fn main() { let backend = audio_backend::find(None).unwrap(); println!("Connecting .."); - let session = Session::connect(session_config, credentials, None).await.unwrap(); + let session = Session::connect(session_config, credentials, None) + .await + .unwrap(); - let (mut player, _) = Player::new(player_config, session, None, move || { - backend(None) - }); + let (mut player, _) = Player::new(player_config, session, None, move || backend(None)); player.load(track, true, 0); diff --git a/examples/playlist_tracks.rs b/examples/playlist_tracks.rs index 7bd95ae..e96938c 100644 --- a/examples/playlist_tracks.rs +++ b/examples/playlist_tracks.rs @@ -25,7 +25,9 @@ async fn main() { let plist_uri = SpotifyId::from_base62(uri_parts[2]).unwrap(); - let session = Session::connect(session_config, credentials, None).await.unwrap(); + let session = Session::connect(session_config, credentials, None) + .await + .unwrap(); let plist = Playlist::get(&session, plist_uri).await.unwrap(); println!("{:?}", plist);