Serene-Arc / listenbrainz-playlist-uploader

A program to upload playlists to Listenbrainz and give feedback in bulk
MIT License
4 stars 1 forks source link

Compilation failing #2

Closed yetanotherketan closed 7 months ago

yetanotherketan commented 8 months ago

Tried compiling this using cargo build, i'm getting following failures.

me@me-home:~/Downloads/listenbrainz-playlist-uploader-master$ cargo build
   Compiling listenbrainz_playlist_uploader v0.1.0 (/home/ketan/Downloads/listenbrainz-playlist-uploader-master)
error[E0446]: private type `Feedback` in public interface
  --> src/feedback.rs:22:1
   |
22 | / pub async fn give_song_feedback_for_mbid(
23 | |     listenbrainz_client: &mut ListenbrainzClient,
24 | |     mbid: &str,
25 | |     feedback: Feedback,
26 | | ) -> Result<()> {
   | |_______________^ can't leak private type
   |
  ::: src/main.rs:52:1
   |
52 |   enum Feedback {
   |   ------------- `Feedback` declared as private

error[E0446]: private type `Feedback` in public interface
  --> src/feedback.rs:42:1
   |
42 | / pub async fn get_existing_feedback(
43 | |     listenbrainz_client: &mut ListenbrainzClient,
44 | |     user_name: &str,
45 | |     feedback: Feedback,
46 | | ) -> Result<HashSet<String>> {
   | |____________________________^ can't leak private type
   |
  ::: src/main.rs:52:1
   |
52 |   enum Feedback {
   |   ------------- `Feedback` declared as private

For more information about this error, try `rustc --explain E0446`.
error: could not compile `listenbrainz_playlist_uploader` (bin "listenbrainz_playlist_uploader") due to 2 previous errors
Serene-Arc commented 8 months ago

I don't get this error, and it doesn't really make sense. What toolchain are you using?

yetanotherketan commented 7 months ago

I'm new to rust so please bear with me.

I'm compiling on Linux Mint 21.3 (Virginia)

me@me-home:~/Downloads/listenbrainz-playlist-uploader-master$ rustc --version
rustc 1.72.1 (d5c2e9c34 2023-09-13) (built from a source tarball)
me@me-home:~/Downloads/listenbrainz-playlist-uploader-master$ cargo --version
cargo 1.72.1
Serene-Arc commented 7 months ago

Perhaps try updating? I am using 1.75 for both.

yetanotherketan commented 7 months ago

Yes, the compilation worked with latest rust 1.76.