remove redundant part of error messages

This commit is contained in:
ToruNiina
2018-12-10 21:42:56 +09:00
parent 3f991c4759
commit ff83a6a477

View File

@@ -907,8 +907,7 @@ parse_key_value_pair(location<Container>& loc)
if(!key) if(!key)
{ {
loc.iter() = first; loc.iter() = first;
return err("[error] toml::parse_key_value_pair: while reading key-value" return err(key.unwrap_err());
" pair" + key.unwrap_err());
} }
const auto kvsp = lex_keyval_sep::invoke(loc); const auto kvsp = lex_keyval_sep::invoke(loc);
@@ -924,8 +923,7 @@ parse_key_value_pair(location<Container>& loc)
if(!val) if(!val)
{ {
loc.iter() = first; loc.iter() = first;
return err("[error] toml::parse_key_value_pair: while reading key-value" return err(val.unwrap_err());
" pair" + val.unwrap_err());
} }
return ok(std::make_pair(std::move(key.unwrap()), std::move(val.unwrap()))); return ok(std::make_pair(std::move(key.unwrap()), std::move(val.unwrap())));
} }