Skip to content

Commit

Permalink
~[] to Vec in style/properties.rs.mako and selector_matching.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
murphm8 authored and Ms2ger committed May 4, 2014
1 parent 58bbe65 commit 093e9fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/components/style/properties.rs.mako
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ pub mod longhands {
pub enum T {
normal,
none,
Content(~[Content]),
Content(Vec<Content>),
}
}
pub type SpecifiedValue = computed_value::T;
Expand All @@ -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)
Expand Down Expand Up @@ -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 {
Expand All @@ -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(
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions src/components/style/selector_matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
}
}
Expand Down

0 comments on commit 093e9fd

Please sign in to comment.