Compare commits

..

No commits in common. "c78e2df00d9ac32c1c9e31dc8b8a35a8241536ec" and "dee8fe9ab94cc5fdddc94cbae0129a06243d47df" have entirely different histories.

2 changed files with 12 additions and 10 deletions

View File

@ -208,16 +208,18 @@ fn handle_river_output_status(
tags, tags,
} => { } => {
if let Some(output) = env.outputs.get_mut(&output_id) { if let Some(output) = env.outputs.get_mut(&output_id) {
output.populated_tags.clear(); output.populated_tags = tags[0..]
for tag_ind in 0..(tags.len()) { .chunks(4)
for bit_ind in 0..=7 { .map(|s| {
if tags[tag_ind] & (1 << bit_ind) != 0 { let buf = [s[0], s[1], s[2], s[3]];
output.populated_tags.push( let tagmask = u32::from_le_bytes(buf);
((tag_ind * 8 + bit_ind + 1) % 32) as u32 for i in 0..32 {
); if 1 << i == tagmask {
} return 1 + i;
} }
} }
0
}).collect();
} }
}, },
zriver_output_status_v1::Event::UrgentTags { zriver_output_status_v1::Event::UrgentTags {

View File

@ -5,7 +5,7 @@ pub mod generated {
// so we isolate it into a very permissive module // so we isolate it into a very permissive module
#![allow(dead_code, non_camel_case_types, unused_unsafe, unused_variables)] #![allow(dead_code, non_camel_case_types, unused_unsafe, unused_variables)]
#![allow(non_upper_case_globals, non_snake_case, unused_imports)] #![allow(non_upper_case_globals, non_snake_case, unused_imports)]
#![allow(static_mut_refs, clippy::all)] #![allow(clippy::all)]
pub mod client { pub mod client {
// These imports are used by the generated code // These imports are used by the generated code