diff --git a/components/util/smallvec.rs b/components/util/smallvec.rs index f0767c3ec5a..b1fbffb2075 100644 --- a/components/util/smallvec.rs +++ b/components/util/smallvec.rs @@ -7,6 +7,7 @@ use std::mem::init as i; use std::cmp; +use std::fmt; use std::intrinsics; use std::kinds::marker::ContravariantLifetime; use std::mem; @@ -435,6 +436,12 @@ macro_rules! def_small_vector( } } + impl fmt::Show for $name { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", self.as_slice()) + } + } + impl $name { #[inline] pub fn new() -> $name {