mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
cleanup a typecast ambiguity due to new API
Rust can't tell how to cast some u32_le into u32/usize automatically due to confusion with the num_derive trait, so we have to explicitly specify a chain of typecasts to clean up the conflict with the new rkyv
This commit is contained in:
parent
1b0fa6e04b
commit
0fbca1cd4d
1 changed files with 8 additions and 3 deletions
|
|
@ -845,7 +845,9 @@ fn main() -> ! {
|
|||
match xns.request_connection_blocking(kr.server_name.as_str()) {
|
||||
Ok(cid) => {
|
||||
listener_conn = Some(cid);
|
||||
listener_op = Some(kr.listener_op_id as usize);
|
||||
listener_op = Some(<usize as From<usize>>::from(<u32 as From<u32>>::from(
|
||||
kr.listener_op_id.into(),
|
||||
) as usize));
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("couldn't connect to listener: {:?}", e);
|
||||
|
|
@ -860,7 +862,7 @@ fn main() -> ! {
|
|||
match xns.request_connection_blocking(kr.server_name.as_str()) {
|
||||
Ok(cid) => {
|
||||
raw_listener_conn = Some(cid);
|
||||
raw_listener_op = Some(kr.listener_op_id as u32);
|
||||
raw_listener_op = Some(<u32 as From<u32>>::from(kr.listener_op_id.into()));
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("couldn't connect to listener: {:?}", e);
|
||||
|
|
@ -876,7 +878,10 @@ fn main() -> ! {
|
|||
match xns.request_connection_blocking(kr.server_name.as_str()) {
|
||||
Ok(cid) => {
|
||||
observer_conn = Some(cid);
|
||||
observer_op = Some(kr.listener_op_id as usize);
|
||||
observer_op = Some(<usize as From<usize>>::from(<u32 as From<u32>>::from(
|
||||
kr.listener_op_id.into(),
|
||||
)
|
||||
as usize));
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("couldn't connect to observer: {:?}", e);
|
||||
|
|
|
|||
Loading…
Reference in a new issue