Skip to content

Commit

Permalink
make Option::and fully polymorphic
Browse files Browse the repository at this point in the history
  • Loading branch information
micahrj committed Oct 9, 2013
1 parent 6017b3c commit c5ee0d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl<T> Option<T> {

/// Returns `None` if the option is `None`, otherwise returns `optb`.
#[inline]
pub fn and(self, optb: Option<U>) -> Option<U> {
pub fn and<U>(self, optb: Option<U>) -> Option<U> {
match self {
Some(_) => optb,
None => None,
Expand Down

5 comments on commit c5ee0d8

@bors
Copy link
Contributor

@bors bors commented on c5ee0d8 Oct 9, 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 micahrj@c5ee0d8

@bors
Copy link
Contributor

@bors bors commented on c5ee0d8 Oct 9, 2013

Choose a reason for hiding this comment

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

merging micahjohnston/rust/master = c5ee0d8 into auto

@bors
Copy link
Contributor

@bors bors commented on c5ee0d8 Oct 9, 2013

Choose a reason for hiding this comment

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

micahjohnston/rust/master = c5ee0d8 merged ok, testing candidate = 002b3b92

@bors
Copy link
Contributor

@bors bors commented on c5ee0d8 Oct 9, 2013

@alexcrichton
Copy link
Member

Choose a reason for hiding this comment

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

Looks to be a legitimate failure, there's a type which needs its bounds specified now (probably and(None) and that's it)

Please sign in to comment.