set works
This commit is contained in:
@@ -20,8 +20,6 @@ pub fn updater_thread(operation_rx : Receiver<Operation>, instance: &Instance) -
|
|||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
println!("updater_thread loop beginning: {}", operation_rx.len());
|
|
||||||
|
|
||||||
let mut operation = operation_rx.recv()?;
|
let mut operation = operation_rx.recv()?;
|
||||||
trace!("OPERATION {}", count);
|
trace!("OPERATION {}", count);
|
||||||
|
|
||||||
|
|||||||
@@ -216,16 +216,18 @@ impl MizeMessage {
|
|||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
let mut tmp_val = &CborValue::Null;
|
let mut tmp_val = &CborValue::Null;
|
||||||
|
let mut found = false;
|
||||||
for (key, val) in msg_as_map {
|
for (key, val) in msg_as_map {
|
||||||
if let CborValue::Integer(key_int) = key {
|
if let CborValue::Integer(key_int) = key {
|
||||||
// number three indicates the data field
|
// number three indicates the data field
|
||||||
let three: Integer = 3.into();
|
let three: Integer = 3.into();
|
||||||
if key_int == &three {
|
if key_int == &three {
|
||||||
tmp_val = val;
|
tmp_val = val;
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if tmp_val == &CborValue::Null {
|
if ! found {
|
||||||
return Err(MizeError::new().msg("error getting the data value form a msg"));
|
return Err(MizeError::new().msg("error getting the data value form a msg"));
|
||||||
}
|
}
|
||||||
tmp_val
|
tmp_val
|
||||||
|
|||||||
Reference in New Issue
Block a user