mirror of
https://github.com/servo/servo.git
synced 2025-08-23 06:15:35 +01:00
stylo: Remove ThreadSafeArray.
MozReview-Commit-ID: JSpV8nhIVQA
This commit is contained in:
parent
0ebb9ec9e8
commit
7654488988
3 changed files with 135 additions and 238 deletions
|
@ -7,7 +7,7 @@
|
|||
use app_units::Au;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs::{nsCSSValue, nsCSSUnit};
|
||||
use gecko_bindings::structs::{nsCSSValue_Array, nsCSSValue_ThreadSafeArray, nscolor};
|
||||
use gecko_bindings::structs::{nsCSSValue_Array, nscolor};
|
||||
use std::mem;
|
||||
use std::ops::{Index, IndexMut};
|
||||
use std::slice;
|
||||
|
@ -127,9 +127,7 @@ impl Drop for nsCSSValue {
|
|||
}
|
||||
}
|
||||
|
||||
macro_rules! decl_cssarray_sugar {
|
||||
($name:ident) => {
|
||||
impl $name {
|
||||
impl nsCSSValue_Array {
|
||||
/// Return the length of this `nsCSSValue::Array`
|
||||
#[inline]
|
||||
pub fn len(&self) -> usize {
|
||||
|
@ -154,7 +152,7 @@ impl $name {
|
|||
}
|
||||
}
|
||||
|
||||
impl Index<usize> for $name {
|
||||
impl Index<usize> for nsCSSValue_Array {
|
||||
type Output = nsCSSValue;
|
||||
#[inline]
|
||||
fn index(&self, i: usize) -> &nsCSSValue {
|
||||
|
@ -162,14 +160,9 @@ impl Index<usize> for $name {
|
|||
}
|
||||
}
|
||||
|
||||
impl IndexMut<usize> for $name {
|
||||
impl IndexMut<usize> for nsCSSValue_Array {
|
||||
#[inline]
|
||||
fn index_mut(&mut self, i: usize) -> &mut nsCSSValue {
|
||||
&mut self.as_mut_slice()[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decl_cssarray_sugar!(nsCSSValue_Array);
|
||||
decl_cssarray_sugar!(nsCSSValue_ThreadSafeArray);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue