std: Add a bunch of Default impls
This commit is contained in:
parent
38f97ea103
commit
ca47eebb44
12 changed files with 82 additions and 5 deletions
|
@ -45,6 +45,12 @@ impl TotalEq for () {
|
|||
fn equals(&self, _other: &()) -> bool { true }
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
impl Default for () {
|
||||
#[inline]
|
||||
fn default() -> () { () }
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
impl Zero for () {
|
||||
#[inline]
|
||||
|
@ -52,8 +58,3 @@ impl Zero for () {
|
|||
#[inline]
|
||||
fn is_zero(&self) -> bool { true }
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
impl Default for () {
|
||||
fn default() -> () { () }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue