Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
Aaaaaaaaaaa
┌─[mothersphere@archlinux] - [Grape] - [ main +266 / -5 ] └─>[$] cargo run Compiling grape v0.1.0 (/home/mothersphere/Grape) error[E0308]: `if` and `else` have incompatible types --> src/audio/mod.rs:170:13 | 167 | let source = if position > Duration::ZERO { | ______________________- 168 | | decoder.skip_duration(position) | | ------------------------------- expected because of this 169 | | } else { 170 | | decoder | | ^^^^^^^ expected `SkipDuration<Decoder<BufReader<File>>>`, found `Decoder<BufReader<File>>` 171 | | }; | |_________- `if` and `else` have incompatible types | = note: expected struct `SkipDuration<Decoder<_>>` found struct `Decoder<_>` error[E0277]: `?` couldn't convert the error to `PlayerError` --> src/audio/mod.rs:172:48 | 172 | let sink = Sink::try_new(stream_handle)?; | ----------------------------^ the trait `From<PlayError>` is not implemented for `PlayerError` | | | this can't be annotated with `?` because it has type `Result<_, PlayError>` | note: `PlayerError` needs to implement `From<PlayError>` --> src/audio/mod.rs:9:1 | 9 | pub enum PlayerError { | ^^^^^^^^^^^^^^^^^^^^ = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait = help: the following other types implement trait `From<T>`: `PlayerError` implements `From<rodio::StreamError>` `PlayerError` implements `From<rodio::decoder::DecoderError>` `PlayerError` implements `From<std::io::Error>` error[E0308]: mismatched types --> src/main.rs:58:24 | 58 | index: format!("{:02}", index + 1), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `SharedString`, found `String` | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) help: call `Into::into` on this expression to convert `String` into `slint::SharedString` | 58 | index: format!("{:02}", index + 1).into(), | +++++++ error[E0308]: mismatched types --> src/main.rs:60:24 | 60 | title: entry.title.clone(), | ^^^^^^^^^^^^^^^^^^^ expected `SharedString`, found `String` | help: call `Into::into` on this expression to convert `String` into `slint::SharedString` | 60 | title: entry.title.clone().into(), | +++++++ error[E0308]: mismatched types --> src/main.rs:61:25 | 61 | artist: entry.artist.clone(), | ^^^^^^^^^^^^^^^^^^^^ expected `SharedString`, found `String` | help: call `Into::into` on this expression to convert `String` into `slint::SharedString` | 61 | artist: entry.artist.clone().into(), | +++++++ error[E0308]: mismatched types --> src/main.rs:62:27 | 62 | duration: entry | ___________________________^ 63 | | .duration 64 | | .map(format_duration) 65 | | .unwrap_or_else(|| "--:--".into()), | |______________________________________________________^ expected `SharedString`, found `String` | help: call `Into::into` on this expression to convert `String` into `slint::SharedString` | 65 | .unwrap_or_else(|| "--:--".into()).into(), | +++++++ error[E0308]: mismatched types --> src/main.rs:232:35 | 232 | main_window.set_library_items(library_items.clone()); | ----------------- ^^^^^^^^^^^^^^^^^^^^^ expected `ModelRc<SidebarItem>`, found `Vec<LibraryTrack>` | | | arguments to this method are incorrect | = note: expected struct `ModelRc<SidebarItem>` found struct `Vec<LibraryTrack>` note: method defined here --> /home/mothersphere/Grape/target/debug/build/grape-cd20068b61a8de2e/out/main.rs:24156:39 | 24156 | # [allow (dead_code)] pub fn set_library_items (& self , value : sp :: ModelRc < r#SidebarItem >) { | ^^^^^^^^^^^^^^^^^ --------------------------------------- Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`. error: could not compile `grape` (bin "grape") due to 7 previous errors
Créé il y a 3 semaines.