fix wasm log ignore bug

This commit is contained in:
Christien Rioux 2024-04-07 10:54:24 -04:00
parent fa4d779ec5
commit 98786ca827
3 changed files with 9 additions and 11 deletions

View File

@ -272,7 +272,7 @@ pub fn change_log_ignore(layer: String, log_ignore: String) {
// Change all layers
for f in filters.values() {
f.set_ignore_list(Some(VeilidLayerFilter::apply_ignore_change(
f.ignore_list(),
&f.ignore_list(),
log_ignore.clone(),
)));
}
@ -280,7 +280,7 @@ pub fn change_log_ignore(layer: String, log_ignore: String) {
// Change a specific layer
let f = filters.get(layer.as_str()).unwrap();
f.set_ignore_list(Some(VeilidLayerFilter::apply_ignore_change(
f.ignore_list(),
&f.ignore_list(),
log_ignore.clone(),
)));
}

View File

@ -136,18 +136,16 @@ impl VeilidClient {
if layer.is_empty() {
// Change all layers
for f in filters.values() {
f.set_ignore_list(Some(VeilidLayerFilter::apply_ignore_change(
f.ignore_list(),
changes.clone(),
)));
let mut ignore_list = f.ignore_list();
VeilidLayerFilter::apply_ignore_change_list(&mut ignore_list, &changes);
f.set_ignore_list(Some(ignore_list));
}
} else {
// Change a specific layer
let f = filters.get(layer.as_str()).unwrap();
f.set_ignore_list(Some(VeilidLayerFilter::apply_ignore_change(
f.ignore_list(),
changes.clone(),
)));
let mut ignore_list = f.ignore_list();
VeilidLayerFilter::apply_ignore_change_list(&mut ignore_list, &changes);
f.set_ignore_list(Some(ignore_list));
}
}
/// Shut down Veilid and terminate the API.

View File

@ -21,7 +21,7 @@
},
"../pkg": {
"name": "veilid-wasm",
"version": "0.2.5",
"version": "0.3.1",
"dev": true,
"license": "MPL-2.0"
},