From 376c6b34ce55aa3c55c1599aac3567702366e892 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 9 May 2016 16:03:23 -0700 Subject: [PATCH] gfx: Implement `Debug` for `FontTemplate` instances. --- components/gfx/font_template.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/gfx/font_template.rs b/components/gfx/font_template.rs index c05230a9930..1d6b271deaa 100644 --- a/components/gfx/font_template.rs +++ b/components/gfx/font_template.rs @@ -6,6 +6,7 @@ use font::FontHandleMethods; use platform::font::FontHandle; use platform::font_context::FontContextHandle; use platform::font_template::FontTemplateData; +use std::fmt::{Debug, Error, Formatter}; use std::sync::{Arc, Weak}; use std::u32; use string_cache::Atom; @@ -66,6 +67,12 @@ pub struct FontTemplate { is_valid: bool, } +impl Debug for FontTemplate { + fn fmt(&self, f: &mut Formatter) -> Result<(), Error> { + self.identifier.fmt(f) + } +} + /// Holds all of the template information for a font that /// is common, regardless of the number of instances of /// this font handle per thread.