mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Use std::mem::take instead of defining it
This commit is contained in:
parent
b2b3ea992c
commit
80eec48d37
3 changed files with 5 additions and 15 deletions
|
@ -81,12 +81,3 @@ fn relative_adjustement(
|
|||
block: adjust(box_offsets.block_start, box_offsets.block_end),
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: use std::mem::take when it’s stable.
|
||||
// https://github.com/rust-lang/rust/issues/61129
|
||||
fn take<T>(x: &mut T) -> T
|
||||
where
|
||||
T: Default,
|
||||
{
|
||||
std::mem::replace(x, Default::default())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue