mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Remove some uses of unused unsafe.
This commit is contained in:
parent
2efbf2230a
commit
69ddb9501b
10 changed files with 45 additions and 60 deletions
|
@ -226,9 +226,7 @@ impl nsCSSValue {
|
|||
/// Panics if the unit is not `eCSSUnit_Degree` `eCSSUnit_Grad`, `eCSSUnit_Turn`
|
||||
/// or `eCSSUnit_Radian`.
|
||||
pub fn get_angle(&self) -> Angle {
|
||||
unsafe {
|
||||
Angle::from_gecko_values(self.float_unchecked(), self.mUnit)
|
||||
}
|
||||
Angle::from_gecko_values(self.float_unchecked(), self.mUnit)
|
||||
}
|
||||
|
||||
/// Sets Angle value to this nsCSSValue.
|
||||
|
|
|
@ -99,7 +99,7 @@ impl<T> nsTArray<T> {
|
|||
/// This will not leak since it only works on POD types (and thus doesn't assert)
|
||||
pub unsafe fn set_len_pod(&mut self, len: u32) where T: Copy {
|
||||
self.ensure_capacity(len as usize);
|
||||
let header = unsafe { self.header_mut() };
|
||||
let header = self.header_mut();
|
||||
header.mLength = len;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ impl nsTimingFunction {
|
|||
self.mType = function_type;
|
||||
unsafe {
|
||||
let ref mut gecko_cubic_bezier =
|
||||
unsafe { self.__bindgen_anon_1.mFunc.as_mut() };
|
||||
self.__bindgen_anon_1.mFunc.as_mut();
|
||||
gecko_cubic_bezier.mX1 = x1;
|
||||
gecko_cubic_bezier.mY1 = y1;
|
||||
gecko_cubic_bezier.mX2 = x2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue