mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Janitor: Fix clippy::map_clone
This commit is contained in:
parent
0d73917526
commit
04738a900f
3 changed files with 4 additions and 4 deletions
|
@ -483,7 +483,7 @@ declare_types! {
|
|||
|
||||
method show(mut cx) {
|
||||
let this = cx.this();
|
||||
let window = cx.borrow(&this, |x| x.0.as_ref().map(|c| c.clone()));
|
||||
let window = cx.borrow(&this, |x| x.0.as_ref().cloned());
|
||||
let window = window.ok_or(()).or_else(|()| cx.throw_error("Invalid type"))?;
|
||||
window.show();
|
||||
Ok(JsUndefined::new().as_value(&mut cx))
|
||||
|
@ -491,7 +491,7 @@ declare_types! {
|
|||
|
||||
method hide(mut cx) {
|
||||
let this = cx.this();
|
||||
let window = cx.borrow(&this, |x| x.0.as_ref().map(|c| c.clone()));
|
||||
let window = cx.borrow(&this, |x| x.0.as_ref().cloned());
|
||||
let window = window.ok_or(()).or_else(|()| cx.throw_error("Invalid type"))?;
|
||||
window.hide();
|
||||
Ok(JsUndefined::new().as_value(&mut cx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue