mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
fix(graphics-server): convert "never" types
Fixes build failure due to a type mismatch between `Never` and `!` in `claim_main_thread`.
This commit is contained in:
parent
0522cf9c93
commit
8504b6fc6b
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