mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Stop using Vec::from_elem.
It is obsolete on Rust master.
This commit is contained in:
parent
60a901328a
commit
05c4e3b9f5
5 changed files with 15 additions and 8 deletions
|
@ -8,6 +8,7 @@ use servo_util::range::{Range, RangeIndex, EachIndex};
|
|||
use servo_util::geometry::Au;
|
||||
|
||||
use std::cmp::PartialOrd;
|
||||
use std::iter::repeat;
|
||||
use std::num::NumCast;
|
||||
use std::mem;
|
||||
use std::u16;
|
||||
|
@ -526,7 +527,8 @@ impl<'a> GlyphStore {
|
|||
assert!(length > 0);
|
||||
|
||||
GlyphStore {
|
||||
entry_buffer: Vec::from_elem(length as uint, GlyphEntry::initial()),
|
||||
entry_buffer: repeat(GlyphEntry::initial()).take(length as uint)
|
||||
.collect(),
|
||||
detail_store: DetailedGlyphStore::new(),
|
||||
is_whitespace: is_whitespace,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue