Skip to content

Commit c5ee0d8

Browse files
committed
make Option::and fully polymorphic
1 parent 6017b3c commit c5ee0d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/option.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<T> Option<T> {
132132

133133
/// Returns `None` if the option is `None`, otherwise returns `optb`.
134134
#[inline]
135-
pub fn and(self, optb: Option<U>) -> Option<U> {
135+
pub fn and<U>(self, optb: Option<U>) -> Option<U> {
136136
match self {
137137
Some(_) => optb,
138138
None => None,

0 commit comments

Comments
 (0)