From a0937023b50e07815de07db4ebbeaa9cbdcaa428 Mon Sep 17 00:00:00 2001 From: Pyfisch Date: Sat, 10 Nov 2018 13:27:49 +0100 Subject: [PATCH] Enable old glyph assertion The assertion had a note that it should be enabled when something like debug_assert is available. --- components/gfx/text/glyph.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs index d7029e86225..b72facdb162 100644 --- a/components/gfx/text/glyph.rs +++ b/components/gfx/text/glyph.rs @@ -223,16 +223,7 @@ impl<'a> DetailedGlyphStore { entry_offset, glyphs ); - // TODO: don't actually assert this until asserts are compiled - // in/out based on severity, debug/release, etc. This assertion - // would wreck the complexity of the lookup. - // - // See Rust Issue #3647, #2228, #3627 for related information. - // - // do self.detail_lookup.borrow |arr| { - // assert !arr.contains(entry) - // } - + debug_assert!(!self.detail_lookup.contains(&entry)); self.detail_lookup.push(entry); self.detail_buffer.extend_from_slice(glyphs); self.lookup_is_sorted = false;