Pastebin
Retrouvez, créez et partagez vos snippets en temps réel.
Rechercher un Pastebin
Aucun paste trouvé.
Créer un paste
Pastebin
Blog
azazaza
┌─[mothersphere@archlinux] - [Grape] - [ main + / - ] └─>[$] cargo run Compiling grape v0.1.0 (/home/mothersphere/Grape) error[E0599]: no method named `row_count` found for struct `Rc<VecModel<Track>>` in the current scope --> src/main.rs:177:34 | 177 | if top_tracks_for_remove.row_count() > 0 { | ^^^^^^^^^ method not found in `Rc<VecModel<Track>>` | ::: /home/mothersphere/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.14.1/model.rs:125:8 | 125 | fn row_count(&self) -> usize; | --------- the method is available for `Rc<VecModel<Track>>` here | = help: items from traits can only be used if the trait is in scope help: trait `Model` which provides `row_count` is implemented but not in scope; perhaps you want to import it | 1 + use slint::Model; | For more information about this error, try `rustc --explain E0599`. error: could not compile `grape` (bin "grape") due to 1 previous error ┌─[mothersphere@archlinux] - [Grape] - [ main + / - ] [2s917ms] └─>[$] rustc --explain E0599 This error occurs when a method is used on a type which doesn't implement it: Erroneous code example: struct Mouth; let x = Mouth; x.chocolate(); // error: no method named `chocolate` found for type `Mouth` // in the current scope In this case, you need to implement the chocolate method to fix the error: struct Mouth; impl Mouth { fn chocolate(&self) { // We implement the `chocolate` method here. println!("Hmmm! I love chocolate!"); } } let x = Mouth; x.chocolate(); // ok! ┌─[mothersphere@archlinux] - [Grape] - [ main + / - ]
Créé il y a 3 semaines.