Skip to content

Commit

Permalink
Add #[inline] to impl Zero for ()
Browse files Browse the repository at this point in the history
Follow-up to #8155
  • Loading branch information
stepancheg committed Aug 8, 2013
1 parent a0080f4 commit b9945f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libstd/nil.rs
Expand Up @@ -55,7 +55,9 @@ impl TotalEq for () {

#[cfg(not(test))]
impl Zero for () {
#[inline]
fn zero() -> () { () }
#[inline]
fn is_zero(&self) -> bool { true }
}

5 comments on commit b9945f8

@bors
Copy link
Contributor

@bors bors commented on b9945f8 Aug 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at stepancheg@b9945f8

@bors
Copy link
Contributor

@bors bors commented on b9945f8 Aug 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging stepancheg/rust/zero-unit-inline = b9945f8 into auto

@bors
Copy link
Contributor

@bors bors commented on b9945f8 Aug 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stepancheg/rust/zero-unit-inline = b9945f8 merged ok, testing candidate = eebcff1

@bors
Copy link
Contributor

@bors bors commented on b9945f8 Aug 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = eebcff1

Please sign in to comment.