error info:
cannot move out of tt_clone, a captured variable in an FnMut closure
tt_clone is moved hererustcClick for full compiler diagnostic
main.rs(25, 9): captured outer variable
main.rs(26, 5): captured by this FnMut closure
main.rs(33, 31): variable moved due to use in closure
main.rs(33, 31): move occurs because tt_clone has type String, which does not implement the Copy trait
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Sycamore: [e.g. 0.8.2, master]
Browser: [e.g. chrome, safari, if applicable]
OS: [e.g. Windows, if applicable]
Additional context
Add any other context about the problem here.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
[component(inline_props)]
fn T(cx:Scope,title: String, level: i32) -> View {
let tt = title.clone();
}
error info: cannot move out of
tt_clone
, a captured variable in anFnMut
closurett_clone
is moved hererustcClick for full compiler diagnostic main.rs(25, 9): captured outer variable main.rs(26, 5): captured by thisFnMut
closure main.rs(33, 31): variable moved due to use in closure main.rs(33, 31): move occurs becausett_clone
has typeString
, which does not implement theCopy
traitExpected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Environment
Additional context Add any other context about the problem here.