Move TokensOrDefault out of root
diff --git a/src/lib.rs b/src/lib.rs
index 2387af7..799f1c7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -582,6 +582,12 @@
mod span;
+#[cfg(all(
+ any(feature = "full", feature = "derive"),
+ feature = "printing"
+))]
+mod print;
+
////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "parsing")]
@@ -807,25 +813,3 @@
};
};
}
-
-#[cfg(all(
- any(feature = "full", feature = "derive"),
- feature = "printing"
-))]
-struct TokensOrDefault<'a, T: 'a>(&'a Option<T>);
-
-#[cfg(all(
- any(feature = "full", feature = "derive"),
- feature = "printing"
-))]
-impl<'a, T> quote::ToTokens for TokensOrDefault<'a, T>
-where
- T: quote::ToTokens + Default,
-{
- fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
- match *self.0 {
- Some(ref t) => t.to_tokens(tokens),
- None => T::default().to_tokens(tokens),
- }
- }
-}