ITADN

[Playground] Cannot build waterui-controls

#116Openhernangonzalez 创建于 2026-03-01
cli
H
hernangonzalezcommented
Hello! I have created a new playground project for all targets, and it is not building the controls crate. Am I supposed to use a nightly toolchain maybe? ``` error[E0507]: cannot move out of `*value` which is behind a shared reference --> /Users/hernangonzalez/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/waterui-controls-0.2.1/src/slider.rs:79:48 | 79 | label: AnyView::new(text!("{:.2}", value)), | ---------------^^^^^- | | | | | move occurs because `*value` has type `Binding<f64>`, which does not implement the `Copy` trait | `*value` moved due to this method call | note: `nami::SignalExt::map` takes ownership of the receiver `self`, which moves `*value` --> /Users/hernangonzalez/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nami-0.9.1/src/ext.rs:14:23 | 14 | fn map<F, Output>(self, f: F) -> Map<Self, F, Output> | ^^^^ help: you can `clone` the value and consume it, but this might not be your desired behavior | 79 | label: AnyView::new(text!("{:.2}", <Binding<f64> as Clone>::clone(&value))), | ++++++++++++++++++++++++++++++++ + help: consider cloning the value if the performance cost is acceptable | 79 | label: AnyView::new(text!("{:.2}", value.clone())), | ++++++++ For more information about this error, try `rustc --explain E0507`. error: could not compile `waterui-controls` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... Error: 0: Failed to build Rust library: Cargo build failed ``` Thank you, H.
10 条评论