Dont add entry if its empty

This commit is contained in:
Gvidas Juknevičius 2024-06-16 20:05:26 +03:00
parent 213fbe31e2
commit c816c1025e
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB

View File

@ -72,7 +72,11 @@ impl PlugMan {
continue; continue;
} }
match plugin.poll(len) { match plugin.poll(len) {
Ok(v) => answers.push((plugin.name().clone(), v)), Ok(v) => {
if !v.is_empty() {
answers.push((plugin.name().clone(), v));
}
},
Err(e) => eprintln!("Failed to poll plugin: {e}"), Err(e) => eprintln!("Failed to poll plugin: {e}"),
} }