aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Murphy <matthew.john.murphy@gmail.com>2014-04-27 11:40:16 -0500
committerMs2ger <ms2ger@gmail.com>2014-05-04 23:16:17 +0200
commit093e9fdd19c67596eb0f5c3770eaa9957a87ff71 (patch)
tree31b7f82ad7b00d1f72536de5ab37001e9e983bea /src
parent58bbe651a02a3bf0933ce0a42488e0ad6a3827fa (diff)
downloadservo-093e9fdd19c67596eb0f5c3770eaa9957a87ff71.tar.gz
servo-093e9fdd19c67596eb0f5c3770eaa9957a87ff71.zip
~[] to Vec in style/properties.rs.mako and selector_matching.rs
Diffstat (limited to 'src')
-rw-r--r--src/components/style/properties.rs.mako14
-rw-r--r--src/components/style/selector_matching.rs6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/components/style/properties.rs.mako b/src/components/style/properties.rs.mako
index 06b4412d6ff..1cf76d712be 100644
--- a/src/components/style/properties.rs.mako
+++ b/src/components/style/properties.rs.mako
@@ -527,7 +527,7 @@ pub mod longhands {
pub enum T {
normal,
none,
- Content(~[Content]),
+ Content(Vec<Content>),
}
}
pub type SpecifiedValue = computed_value::T;
@@ -549,7 +549,7 @@ pub mod longhands {
},
_ => ()
}
- let mut content = ~[];
+ let mut content = Vec::new();
for component_value in input.skip_whitespace() {
match component_value {
&String(ref value)
@@ -1332,8 +1332,8 @@ pub mod shorthands {
pub struct PropertyDeclarationBlock {
- pub important: Arc<~[PropertyDeclaration]>,
- pub normal: Arc<~[PropertyDeclaration]>,
+ pub important: Arc<Vec<PropertyDeclaration>>,
+ pub normal: Arc<Vec<PropertyDeclaration>>,
}
impl<E, S: Encoder<E>> Encodable<S, E> for PropertyDeclarationBlock {
@@ -1349,8 +1349,8 @@ pub fn parse_style_attribute(input: &str, base_url: &Url) -> PropertyDeclaration
pub fn parse_property_declaration_list<I: Iterator<Node>>(input: I, base_url: &Url) -> PropertyDeclarationBlock {
- let mut important = ~[];
- let mut normal = ~[];
+ let mut important = Vec::new();
+ let mut normal = Vec::new();
for item in ErrorLoggerIterator(parse_declaration_list(input)) {
match item {
DeclAtRule(rule) => log_css_error(
@@ -1418,7 +1418,7 @@ pub enum PropertyDeclarationParseResult {
impl PropertyDeclaration {
pub fn parse(name: &str, value: &[ComponentValue],
- result_list: &mut ~[PropertyDeclaration],
+ result_list: &mut Vec<PropertyDeclaration>,
base_url: &Url) -> PropertyDeclarationParseResult {
// FIXME: local variable to work around Rust #10683
let name_lower = name.to_ascii_lower();
diff --git a/src/components/style/selector_matching.rs b/src/components/style/selector_matching.rs
index f728b3dd7ed..03cc5aadad1 100644
--- a/src/components/style/selector_matching.rs
+++ b/src/components/style/selector_matching.rs
@@ -481,14 +481,14 @@ struct Rule {
/// we can sort them.
#[deriving(Clone)]
pub struct MatchedProperty {
- pub declarations: Arc<~[PropertyDeclaration]>,
+ pub declarations: Arc<Vec<PropertyDeclaration>>,
source_order: uint,
specificity: u32,
}
impl MatchedProperty {
#[inline]
- pub fn from_declarations(declarations: Arc<~[PropertyDeclaration]>) -> MatchedProperty {
+ pub fn from_declarations(declarations: Arc<Vec<PropertyDeclaration>>) -> MatchedProperty {
MatchedProperty {
declarations: declarations,
source_order: 0,
@@ -960,7 +960,7 @@ mod tests {
selector: s.compound_selectors.clone(),
property: MatchedProperty {
specificity: s.specificity,
- declarations: Arc::new(~[]),
+ declarations: Arc::new(Vec::new()),
source_order: i,
}
}