quit returning rvalue ref from unwrap_or

This commit is contained in:
ToruNiina 2018-12-17 23:17:45 +09:00
parent 4d02f399a2
commit e3217cd572

View File

@ -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() &