mirror of
https://github.com/fluencelabs/wasm-utils
synced 2025-03-14 18:50:52 +00:00
some reformatting
This commit is contained in:
parent
d8428327d5
commit
3e635514e4
@ -167,7 +167,11 @@ impl<T> RefList<T> {
|
||||
pub fn begin_insert_after<F>(&mut self, mut f: F) -> InsertTransaction<T>
|
||||
where F : FnMut(&T) -> bool
|
||||
{
|
||||
let pos = self.items.iter().position(|rf| f(&**rf.read())).map(|x| x + 1).unwrap_or(self.items.len());
|
||||
let pos = self
|
||||
.items.iter()
|
||||
.position(|rf| f(&**rf.read())).map(|x| x + 1)
|
||||
.unwrap_or(self.items.len());
|
||||
|
||||
self.begin_insert(pos)
|
||||
}
|
||||
|
||||
@ -209,7 +213,6 @@ impl<T> RefList<T> {
|
||||
detached.write().index = EntryOrigin::Detached;
|
||||
total_removed += 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn done_insert(&mut self, index: usize, mut items: Vec<EntryRef<T>>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user