Use chars().count() rather than char_len().

The latter is obsolete in current Rust.
This commit is contained in:
Ms2ger 2015-01-22 13:49:10 +01:00
parent faefb27f3e
commit 024571dfa3
5 changed files with 9 additions and 9 deletions

View file

@ -274,7 +274,7 @@ impl Shaper {
let glyph_data = ShapedGlyphData::new(buffer);
let glyph_count = glyph_data.len();
let byte_max = text.len() as int;
let char_max = text.char_len() as int;
let char_max = text.chars().count() as int;
// GlyphStore records are indexed by character, not byte offset.
// so, we must be careful to increment this when saving glyph entries.