Allow field identifiers be any numbers if #[serde(other)] is used

Thus behavior synchronized between string/bytes identifiers and numeric identifiers
This commit is contained in:
Mingun
2020-10-22 10:18:27 +05:00
parent 34de1e00c8
commit 0737474640
7 changed files with 42 additions and 50 deletions
@@ -347,10 +347,7 @@ const _: () = {
match __value {
0u64 => _serde::export::Ok(__Field::__field0),
1u64 => _serde::export::Ok(__Field::__field1),
_ => _serde::export::Err(_serde::de::Error::invalid_value(
_serde::de::Unexpected::Unsigned(__value),
&"field index 0 <= i < 2",
)),
_ => _serde::export::Ok(__Field::__ignore),
}
}
fn visit_str<__E>(