diff --git a/src/buffer/mod.rs b/src/buffer/mod.rs index b62e188..d524de6 100644 --- a/src/buffer/mod.rs +++ b/src/buffer/mod.rs @@ -21,7 +21,6 @@ const NEG_INFINITY: &'static str = "-inf"; /// let printed = buffer.format_finite(1.234); /// assert_eq!(printed, "1.234"); /// ``` -#[derive(Copy, Clone)] pub struct Buffer { #[cfg(maybe_uninit)] bytes: [MaybeUninit; 24], @@ -93,6 +92,15 @@ impl Buffer { } } +impl Copy for Buffer {} + +impl Clone for Buffer { + #[inline] + fn clone(&self) -> Self { + Buffer::new() + } +} + impl Default for Buffer { #[inline] #[cfg_attr(feature = "no-panic", no_panic)]