Skip to content

Commit

Permalink
[rust] fixes rustfmt check
Browse files Browse the repository at this point in the history
  • Loading branch information
hkrn committed Mar 30, 2024
1 parent 3d0a849 commit 2ec481f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
18 changes: 11 additions & 7 deletions rust/plugin_wasm/src/model/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,17 @@ impl ModelIOPluginController {
}
notify::EventKind::Remove(_) => {
let mut guard = plugins_inner.lock();
let indices = guard.iter().enumerate().filter_map(|(i, plugin)| {
if ev.paths.contains(plugin.path()) {
Some(i)
} else {
None
}
}).collect::<Vec<_>>();
let indices = guard
.iter()
.enumerate()
.filter_map(|(i, plugin)| {
if ev.paths.contains(plugin.path()) {
Some(i)
} else {
None
}
})
.collect::<Vec<_>>();
for index in indices {
let mut plugin = guard.remove(index);
tracing::info!(
Expand Down
18 changes: 11 additions & 7 deletions rust/plugin_wasm/src/motion/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,17 @@ impl MotionIOPluginController {
}
notify::EventKind::Remove(_) => {
let mut guard = plugins_inner.lock();
let indices = guard.iter().enumerate().filter_map(|(i, plugin)| {
if ev.paths.contains(plugin.path()) {
Some(i)
} else {
None
}
}).collect::<Vec<_>>();
let indices = guard
.iter()
.enumerate()
.filter_map(|(i, plugin)| {
if ev.paths.contains(plugin.path()) {
Some(i)
} else {
None
}
})
.collect::<Vec<_>>();
for index in indices {
let mut plugin = guard.remove(index);
tracing::info!(
Expand Down

0 comments on commit 2ec481f

Please sign in to comment.