std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}
This commit is contained in:
parent
e03d60e9eb
commit
38f97ea103
25 changed files with 205 additions and 164 deletions
|
|
@ -118,7 +118,7 @@ pub fn try_getting_local_version(local_path: &Path) -> Option<Version> {
|
|||
if !l.is_whitespace() {
|
||||
output = Some(l);
|
||||
}
|
||||
match output.chain(try_parsing_version) {
|
||||
match output.and_then(try_parsing_version) {
|
||||
Some(v) => return Some(v),
|
||||
None => ()
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ pub fn try_getting_version(remote_path: &Path) -> Option<Version> {
|
|||
}
|
||||
}
|
||||
|
||||
output.chain(try_parsing_version)
|
||||
output.and_then(try_parsing_version)
|
||||
}
|
||||
else {
|
||||
None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue