From ab3334037018f0aa2887383b82a6a460bcd4ba54 Mon Sep 17 00:00:00 2001 From: ge72mum Date: Thu, 20 Oct 2022 09:52:39 +0200 Subject: [PATCH] fixed formatig --- src/app/components/details/details_model.rs | 11 +++++------ .../components/playlist_details/playlist_details.rs | 1 - .../playlist_details/playlist_details_model.rs | 12 +++++------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/app/components/details/details_model.rs b/src/app/components/details/details_model.rs index 7502dae5..48bb9496 100644 --- a/src/app/components/details/details_model.rs +++ b/src/app/components/details/details_model.rs @@ -1,9 +1,8 @@ -use gio::prelude::*; +use gdk::prelude::*; use gio::SimpleActionGroup; use std::cell::Ref; use std::ops::Deref; use std::rc::Rc; -use gdk::prelude::*; use crate::api::SpotifyApiError; use crate::app::components::labels; @@ -103,10 +102,10 @@ impl DetailsModel { pub fn toggle_copy_link(&self) { let album_id = self.id.clone(); let link = format!("https://open.spotify.com/album/{}", &album_id); - let clipboard = gdk::Display::default().unwrap().clipboard(); - clipboard - .set_content(Some(&gdk::ContentProvider::for_value(&link.to_value()))) - .expect("Failed to set clipboard content"); + let clipboard = gdk::Display::default().unwrap().clipboard(); + clipboard + .set_content(Some(&gdk::ContentProvider::for_value(&link.to_value()))) + .expect("Failed to set clipboard content"); } pub fn load_more(&self) -> Option<()> { diff --git a/src/app/components/playlist_details/playlist_details.rs b/src/app/components/playlist_details/playlist_details.rs index bce7f695..94d96cca 100644 --- a/src/app/components/playlist_details/playlist_details.rs +++ b/src/app/components/playlist_details/playlist_details.rs @@ -152,7 +152,6 @@ impl PlaylistDetailsWidget { { self.widget().header_widget.connect_copy(f); } - } pub struct PlaylistDetails { diff --git a/src/app/components/playlist_details/playlist_details_model.rs b/src/app/components/playlist_details/playlist_details_model.rs index 167c5376..76582185 100644 --- a/src/app/components/playlist_details/playlist_details_model.rs +++ b/src/app/components/playlist_details/playlist_details_model.rs @@ -1,8 +1,7 @@ -use gio::prelude::*; +use gdk::prelude::*; use gio::SimpleActionGroup; use std::ops::Deref; use std::rc::Rc; -use gdk::prelude::*; use crate::api::SpotifyApiError; use crate::app::components::SimpleHeaderBarModel; @@ -97,12 +96,11 @@ impl PlaylistDetailsModel { pub fn toggle_copy_link(&self) { let id = self.id.clone(); let link = format!("https://open.spotify.com/playlist/{}", &id); - let clipboard = gdk::Display::default().unwrap().clipboard(); - clipboard - .set_content(Some(&gdk::ContentProvider::for_value(&link.to_value()))) - .expect("Failed to set clipboard content"); + let clipboard = gdk::Display::default().unwrap().clipboard(); + clipboard + .set_content(Some(&gdk::ContentProvider::for_value(&link.to_value()))) + .expect("Failed to set clipboard content"); } - } impl PlaylistModel for PlaylistDetailsModel {