Describe the bug
7 errors trying to build the application with cargo build --release
To Reproduce
Steps to reproduce the behavior:
cargo build --release
Compiling down_on_spot v0.2.2 (/Users/tom/workspace/DownOnSpot)
error[E0308]: mismatched types
--> src/spotify.rs:34:25
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64
, found &std::path::Path
| |
| arguments to this enum variant are incorrect
|
note: tuple variant defined here
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:34:9
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
| ^^^^^^^^^^ ---- argument of type std::option::Option<_>
unexpected
|
note: associated function defined here
--> /Users/tom/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/cache.rs:240:12
|
240 | pub fn new<P: AsRef>(
| ^^^
help: remove the extra argument
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None).unwrap()),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:31:22
|
31 | let (session, _) = Session::connect(
| ^^^^^^^^^^^^^^^^
...
35 | true,
| ---- argument of type bool
unexpected
|
note: associated function defined here
--> /Users/tom/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/session.rs:65:18
|
65 | pub async fn connect(
| ^^^^^^^
help: remove the extra argument
|
31 | let (session, _) = Session::connect(SessionConfig::default(), credentials, Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0308]: mismatched types
--> src/spotify.rs:31:7
|
31 | let (session, ) = Session::connect(
| ^^^^^^^^^^^^-
| | |
| | expected struct Session
, found tuple
32 | | SessionConfig::default(),
33 | | credentials,
34 | | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
35 | | true,
36 | | )
37 | | .await?;
| |____- this expression has type Session
|
= note: expected struct Session
found tuple (_, _)
error[E0599]: no method named unwrap
found for struct std::string::String
in the current scope
--> src/downloader.rs:507:52
|
507 | info!("{} Using {:?} format.", id.to_base62().unwrap(), format);
| ^^^^^^ method not found in std::string::String
error[E0599]: no method named unwrap
found for struct std::string::String
in the current scope
--> src/downloader.rs:518:53
|
518 | warn!("{} Falling back to: {:?}", id.to_base62().unwrap(), quality);
| ^^^^^^ method not found in std::string::String
error[E0599]: no method named unwrap
found for struct std::string::String
in the current scope
--> src/downloader.rs:576:54
|
576 | info!("Done downloading: {}", track.id.to_base62().unwrap());
| ^^^^^^ method not found in std::string::String
Some errors have detailed explanations: E0061, E0308, E0599.
For more information about an error, try rustc --explain E0061
.
error: could not compile down_on_spot
due to 7 previous errors
Expected behavior
Expected DownOnSpot.exe to be compiled
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Using:
cargo --version
cargo 1.64.0-nightly (c0bbd42ce 2022-07-03)
Added librespot = "0.3.1" in the Cargo.toml file