mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-01-02 22:20:08 +00:00
quit returning rvalue ref from unwrap_or
This commit is contained in:
parent
4d02f399a2
commit
e3217cd572
@ -406,10 +406,10 @@ struct result
|
||||
if(is_err()) {return opt;}
|
||||
return this->succ.value;
|
||||
}
|
||||
value_type&& unwrap_or(value_type opt) &&
|
||||
value_type unwrap_or(value_type opt) &&
|
||||
{
|
||||
if(is_err()) {return std::move(opt);}
|
||||
return std::move(this->succ.value);
|
||||
if(is_err()) {return opt;}
|
||||
return this->succ.value;
|
||||
}
|
||||
|
||||
error_type& unwrap_err() &
|
||||
|
Loading…
Reference in New Issue
Block a user