From 880842ac60cbd6ec106b0f75b19f8ae107c24129 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Sat, 17 May 2014 20:12:50 -0700 Subject: [PATCH] Remove a workaround for a missing inferred borrow. --- src/components/gfx/text/glyph.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/gfx/text/glyph.rs b/src/components/gfx/text/glyph.rs index 1ae767f1d06..c7d2761f322 100644 --- a/src/components/gfx/text/glyph.rs +++ b/src/components/gfx/text/glyph.rs @@ -358,9 +358,7 @@ impl<'a> DetailedGlyphStore { detail_offset: 0, // unused }; - // FIXME: This is a workaround for borrow of self.detail_lookup not getting inferred. - let records : &[DetailedGlyphRecord] = self.detail_lookup.as_slice(); - match records.binary_search_index(&key) { + match self.detail_lookup.as_slice().binary_search_index(&key) { None => fail!("Invalid index not found in detailed glyph lookup table!"), Some(i) => { assert!(i + (count as uint) <= self.detail_buffer.len()); @@ -382,9 +380,7 @@ impl<'a> DetailedGlyphStore { detail_offset: 0, // unused }; - // FIXME: This is a workaround for borrow of self.detail_lookup not getting inferred. - let records: &[DetailedGlyphRecord] = self.detail_lookup.as_slice(); - match records.binary_search_index(&key) { + match self.detail_lookup.as_slice().binary_search_index(&key) { None => fail!("Invalid index not found in detailed glyph lookup table!"), Some(i) => { assert!(i + (detail_offset as uint) < self.detail_buffer.len());