mirror of
https://github.com/servo/servo.git
synced 2025-10-17 08:49:21 +01:00
Convert Vec::new() to vec!()
This commit is contained in:
parent
4d595b7d8c
commit
af920f442b
39 changed files with 133 additions and 134 deletions
|
@ -310,8 +310,8 @@ struct DetailedGlyphStore {
|
|||
impl<'a> DetailedGlyphStore {
|
||||
fn new() -> DetailedGlyphStore {
|
||||
DetailedGlyphStore {
|
||||
detail_buffer: Vec::new(), // TODO: default size?
|
||||
detail_lookup: Vec::new(),
|
||||
detail_buffer: vec!(), // TODO: default size?
|
||||
detail_lookup: vec!(),
|
||||
lookup_is_sorted: false
|
||||
}
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ impl<'a> DetailedGlyphStore {
|
|||
// immutable locations thus don't play well with freezing.
|
||||
|
||||
// Thar be dragons here. You have been warned. (Tips accepted.)
|
||||
let mut unsorted_records: Vec<DetailedGlyphRecord> = Vec::new();
|
||||
let mut unsorted_records: Vec<DetailedGlyphRecord> = vec!();
|
||||
mem::swap(&mut self.detail_lookup, &mut unsorted_records);
|
||||
let mut mut_records : Vec<DetailedGlyphRecord> = unsorted_records;
|
||||
mut_records.sort_by(|a, b| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue