Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upOption<T> `map_or` and `map_or_else` type is inconsistent with `map` #27422
Comments
FuGangqiang
changed the title
Option<T> `map_or` and `map_or_else` type is not inconsistent with `map`
Option<T> `map_or` and `map_or_else` type is inconsistent with `map`
Jul 31, 2015
This comment has been minimized.
This comment has been minimized.
|
What use would it be to return |
This comment has been minimized.
This comment has been minimized.
|
Yes as @cybergeek94 these are just shorthands for |
alexcrichton
closed this
Jul 31, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FuGangqiang commentedJul 31, 2015
mapmethod type ismap_ormethod type ismap_or_elsemethod type ismap :
Option<T> -> Option<U>is ok,but
map_orandmap_or_else:Option<T>->U,why not returnOption<U>type