fix: set right visibility in structs & fields

- Cleanup old imports
pull/1/head
Davide Polonio 2021-09-28 15:29:31 +02:00
parent cea5958e43
commit 63eb891f91
2 changed files with 6 additions and 9 deletions

View File

@ -1,6 +1,3 @@
use std::time::Duration;
use aspotify::Client;
use teloxide::prelude::*; use teloxide::prelude::*;
use spotify::SpotifyKind::Track; use spotify::SpotifyKind::Track;

View File

@ -39,17 +39,17 @@ pub fn get_spotify_client() -> Box<Client> {
spotify_client spotify_client
} }
struct TrackInfo { pub struct TrackInfo {
name: String, pub(crate) name: String,
artists: Vec<String>, pub(crate) artists: Vec<String>,
duration: Duration, pub(crate) duration: Duration,
} }
struct AlbumInfo { pub struct AlbumInfo {
pub(crate) name: String, pub(crate) name: String,
pub(crate) artists: Vec<String>, pub(crate) artists: Vec<String>,
pub(crate) genres: Vec<String>, pub(crate) genres: Vec<String>,
songs: Vec<TrackInfo>, pub(crate) songs: Vec<TrackInfo>,
} }
pub async fn get_spotify_track(spotify: Box<Client>, id: &String) -> Option<TrackInfo> { pub async fn get_spotify_track(spotify: Box<Client>, id: &String) -> Option<TrackInfo> {