We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fed1452 commit 98d0886Copy full SHA for 98d0886
http-body-util/src/empty.rs
@@ -15,8 +15,10 @@ pub struct Empty<D> {
15
16
impl<D> Empty<D> {
17
/// Create a new `Empty`.
18
- pub fn new() -> Self {
19
- Self::default()
+ pub const fn new() -> Self {
+ Self {
20
+ _marker: PhantomData,
21
+ }
22
}
23
24
@@ -49,9 +51,7 @@ impl<D> fmt::Debug for Empty<D> {
49
51
50
52
impl<D> Default for Empty<D> {
53
fn default() -> Self {
- Self {
- _marker: PhantomData,
54
- }
+ Self::new()
55
56
57
0 commit comments