mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-03 07:04:34 +00:00
Fix error in generated code:
``` error[E0599]: no method named `unwrap` found for struct `sixtyfps::re_exports::OnceCell` in the current scope --> .../test-driver-rust-0868c471dd25beed/out/imports_external_type.rs:384:29 | 384 | &_self.root.unwrap().upgrade(), | ^^^^^^ method not found in `sixtyfps::re_exports::OnceCell<VWeak<sixtyfps::re_exports::ComponentVTable, imports_external_type::sixtyfps_generated_TestCase::InnerTestCase>>` ```
This commit is contained in:
parent
e9a7be2f62
commit
a6a8f232db
1 changed files with 1 additions and 1 deletions
|
@ -780,7 +780,7 @@ fn generate_component(
|
||||||
}
|
}
|
||||||
|
|
||||||
let root_ref_tokens = if component.is_sub_component() {
|
let root_ref_tokens = if component.is_sub_component() {
|
||||||
quote!(&_self.root.unwrap().upgrade())
|
quote!(&_self.root.get().unwrap().upgrade().unwrap())
|
||||||
} else if component.parent_element.upgrade().map_or(false, |c| {
|
} else if component.parent_element.upgrade().map_or(false, |c| {
|
||||||
c.borrow().enclosing_component.upgrade().unwrap().is_root_component.get()
|
c.borrow().enclosing_component.upgrade().unwrap().is_root_component.get()
|
||||||
}) {
|
}) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue