From 63eb891f91312d5d7c0470fded76c0a2c3d5b403 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Tue, 28 Sep 2021 15:29:31 +0200 Subject: [PATCH] fix: set right visibility in structs & fields - Cleanup old imports --- src/main.rs | 3 --- src/spotify/mod.rs | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index 501a043..b5e2379 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,3 @@ -use std::time::Duration; - -use aspotify::Client; use teloxide::prelude::*; use spotify::SpotifyKind::Track; diff --git a/src/spotify/mod.rs b/src/spotify/mod.rs index e56f36b..cb54cb6 100644 --- a/src/spotify/mod.rs +++ b/src/spotify/mod.rs @@ -39,17 +39,17 @@ pub fn get_spotify_client() -> Box { spotify_client } -struct TrackInfo { - name: String, - artists: Vec, - duration: Duration, +pub struct TrackInfo { + pub(crate) name: String, + pub(crate) artists: Vec, + pub(crate) duration: Duration, } -struct AlbumInfo { +pub struct AlbumInfo { pub(crate) name: String, pub(crate) artists: Vec, pub(crate) genres: Vec, - songs: Vec, + pub(crate) songs: Vec, } pub async fn get_spotify_track(spotify: Box, id: &String) -> Option {