diff --git a/is_empty/src/lib.rs b/is_empty/src/lib.rs index bfb37b8..58ac03e 100644 --- a/is_empty/src/lib.rs +++ b/is_empty/src/lib.rs @@ -106,6 +106,18 @@ impl IsEmpty for std::option::Option { } } +impl IsEmpty for () { + fn is_empty(&self) -> bool { + true + } +} + +impl IsEmpty for Vec { + fn is_empty(&self) -> bool { + self.is_empty() + } +} + /// Thin wrapper function around [IsEmpty::is_empty]. Use it with serde's skip_serializing_if attribute. /// ``` /// use is_empty::IsEmpty;