Skip to content
Permalink
Browse files

Fix `unnecessary `unsafe` block` warning

  • Loading branch information
mttr committed Jan 8, 2015
1 parent 6364636 commit fc49e10f7eae921ee2415eadf4d2f3df962c6122
Showing with 4 additions and 6 deletions.
  1. +4 −6 components/util/deque/mod.rs
@@ -168,12 +168,10 @@ impl<T: Send> BufferPool<T> {
}

fn free(&self, buf: Box<Buffer<T>>) {
unsafe {
let mut pool = self.pool.lock();
match pool.iter().position(|v| v.size() > buf.size()) {
Some(i) => pool.insert(i, buf),
None => pool.push(buf),
}
let mut pool = self.pool.lock();
match pool.iter().position(|v| v.size() > buf.size()) {
Some(i) => pool.insert(i, buf),
None => pool.push(buf),
}
}
}

0 comments on commit fc49e10

Please sign in to comment.
You can’t perform that action at this time.