mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
Janitor: Fix clippy::needless_question_mark
This commit is contained in:
parent
04a2df540a
commit
3c9451f94c
2 changed files with 9 additions and 10 deletions
|
@ -35,15 +35,14 @@ fn run_scoped<'cx, T>(
|
|||
) -> NeonResult<T> {
|
||||
let persistent_context =
|
||||
persistent_context::PersistentContext::from_object(cx, object_with_persistent_context)?;
|
||||
Ok(cx
|
||||
.execute_scoped(|cx| {
|
||||
let cx = RefCell::new(cx);
|
||||
let cx_fn = move |callback: &GlobalContextCallback| {
|
||||
callback(&mut *cx.borrow_mut(), &persistent_context)
|
||||
};
|
||||
GLOBAL_CONTEXT.set(&&cx_fn, functor)
|
||||
})
|
||||
.or_else(|e| cx.throw_error(e))?)
|
||||
cx.execute_scoped(|cx| {
|
||||
let cx = RefCell::new(cx);
|
||||
let cx_fn = move |callback: &GlobalContextCallback| {
|
||||
callback(&mut *cx.borrow_mut(), &persistent_context)
|
||||
};
|
||||
GLOBAL_CONTEXT.set(&&cx_fn, functor)
|
||||
})
|
||||
.or_else(|e| cx.throw_error(e))
|
||||
}
|
||||
|
||||
fn run_with_global_context(f: &GlobalContextCallback) {
|
||||
|
|
|
@ -765,7 +765,7 @@ impl ComponentInstance {
|
|||
pub fn invoke_callback(&self, name: &str, args: &[Value]) -> Result<Value, CallCallbackError> {
|
||||
generativity::make_guard!(guard);
|
||||
let comp = self.inner.unerase(guard);
|
||||
Ok(comp.description().invoke_callback(comp.borrow(), name, &args).map_err(|()| todo!())?)
|
||||
comp.description().invoke_callback(comp.borrow(), name, &args).map_err(|()| todo!())
|
||||
}
|
||||
|
||||
/// Marks the window of this component to be shown on the screen. This registers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue