mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
Merge pull request #375 from yvt/patch/fix-never-type-mismatch
graphics-server: convert "never" types in `backend::betrusted::claim_main_thread`
This commit is contained in:
commit
88a7f016be
1 changed files with 2 additions and 1 deletions
|
|
@ -17,7 +17,8 @@ pub enum Never {}
|
|||
#[inline]
|
||||
pub fn claim_main_thread(f: impl FnOnce(MainThreadToken) -> Never + Send + 'static) -> ! {
|
||||
// Just call the closure - this backend will work on any thread
|
||||
f(MainThreadToken(()))
|
||||
#[allow(unreachable_code)] // false positive
|
||||
match f(MainThreadToken(())) {}
|
||||
}
|
||||
|
||||
pub struct XousDisplay {
|
||||
|
|
|
|||
Loading…
Reference in a new issue