diff --git a/http-body-util/src/empty.rs b/http-body-util/src/empty.rs index d1445b4..e39a4ee 100644 --- a/http-body-util/src/empty.rs +++ b/http-body-util/src/empty.rs @@ -15,8 +15,10 @@ pub struct Empty { impl Empty { /// Create a new `Empty`. - pub fn new() -> Self { - Self::default() + pub const fn new() -> Self { + Self { + _marker: PhantomData, + } } } @@ -49,9 +51,7 @@ impl fmt::Debug for Empty { impl Default for Empty { fn default() -> Self { - Self { - _marker: PhantomData, - } + Self::new() } }