1
2
3
4
5
use std::default::Default;

pub fn is_default<T: Default + PartialEq>(t: &T) -> bool {
  t == &T::default()
}