mirror of
https://github.com/servo/servo.git
synced 2025-08-13 17:35:36 +01:00
Format remaining files
This commit is contained in:
parent
bf47f90da6
commit
cb07debcb6
252 changed files with 5944 additions and 3744 deletions
|
@ -234,9 +234,13 @@ impl nsCSSValue {
|
|||
}
|
||||
debug_assert_eq!(self.mUnit, nsCSSUnit::eCSSUnit_List);
|
||||
let list: &mut structs::nsCSSValueList = &mut unsafe {
|
||||
self.mValue.mList.as_ref() // &*nsCSSValueList_heap
|
||||
.as_mut().expect("List pointer should be non-null")
|
||||
}._base;
|
||||
self.mValue
|
||||
.mList
|
||||
.as_ref() // &*nsCSSValueList_heap
|
||||
.as_mut()
|
||||
.expect("List pointer should be non-null")
|
||||
}
|
||||
._base;
|
||||
for (item, new_value) in list.into_iter().zip(values) {
|
||||
*item = new_value;
|
||||
}
|
||||
|
@ -255,9 +259,13 @@ impl nsCSSValue {
|
|||
}
|
||||
debug_assert_eq!(self.mUnit, nsCSSUnit::eCSSUnit_PairList);
|
||||
let mut item_ptr = &mut unsafe {
|
||||
self.mValue.mPairList.as_ref() // &*nsCSSValuePairList_heap
|
||||
.as_mut().expect("List pointer should be non-null")
|
||||
}._base as *mut structs::nsCSSValuePairList;
|
||||
self.mValue
|
||||
.mPairList
|
||||
.as_ref() // &*nsCSSValuePairList_heap
|
||||
.as_mut()
|
||||
.expect("List pointer should be non-null")
|
||||
}
|
||||
._base as *mut structs::nsCSSValuePairList;
|
||||
while let Some(item) = unsafe { item_ptr.as_mut() } {
|
||||
let value = values.next().expect("Values shouldn't have been exhausted");
|
||||
item.mXValue = value.0;
|
||||
|
|
|
@ -117,7 +117,9 @@ impl<T> nsTArray<T> {
|
|||
I: ExactSizeIterator + Iterator<Item = T>,
|
||||
{
|
||||
debug_assert!(iter.len() <= 0xFFFFFFFF);
|
||||
unsafe { self.set_len_pod(iter.len() as u32); }
|
||||
unsafe {
|
||||
self.set_len_pod(iter.len() as u32);
|
||||
}
|
||||
self.iter_mut().zip(iter).for_each(|(r, v)| *r = v);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue