mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Fix unnecessary
unsafe block
warning
This commit is contained in:
parent
6364636693
commit
fc49e10f7e
1 changed files with 4 additions and 6 deletions
|
@ -168,7 +168,6 @@ 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),
|
||||
|
@ -176,7 +175,6 @@ impl<T: Send> BufferPool<T> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Send> Clone for BufferPool<T> {
|
||||
fn clone(&self) -> BufferPool<T> { BufferPool { pool: self.pool.clone() } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue