mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #2461 : zwarich/servo/glyph-borrow-workaround, r=jdm
This commit is contained in:
commit
7bfbb236ba
1 changed files with 2 additions and 6 deletions
|
@ -358,9 +358,7 @@ impl<'a> DetailedGlyphStore {
|
||||||
detail_offset: 0, // unused
|
detail_offset: 0, // unused
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: This is a workaround for borrow of self.detail_lookup not getting inferred.
|
match self.detail_lookup.as_slice().binary_search_index(&key) {
|
||||||
let records : &[DetailedGlyphRecord] = self.detail_lookup.as_slice();
|
|
||||||
match records.binary_search_index(&key) {
|
|
||||||
None => fail!("Invalid index not found in detailed glyph lookup table!"),
|
None => fail!("Invalid index not found in detailed glyph lookup table!"),
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
assert!(i + (count as uint) <= self.detail_buffer.len());
|
assert!(i + (count as uint) <= self.detail_buffer.len());
|
||||||
|
@ -382,9 +380,7 @@ impl<'a> DetailedGlyphStore {
|
||||||
detail_offset: 0, // unused
|
detail_offset: 0, // unused
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: This is a workaround for borrow of self.detail_lookup not getting inferred.
|
match self.detail_lookup.as_slice().binary_search_index(&key) {
|
||||||
let records: &[DetailedGlyphRecord] = self.detail_lookup.as_slice();
|
|
||||||
match records.binary_search_index(&key) {
|
|
||||||
None => fail!("Invalid index not found in detailed glyph lookup table!"),
|
None => fail!("Invalid index not found in detailed glyph lookup table!"),
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
assert!(i + (detail_offset as uint) < self.detail_buffer.len());
|
assert!(i + (detail_offset as uint) < self.detail_buffer.len());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue