Skip to content

Commit ada50b0

Browse files
committed
ignore_variant variable is always None, let's take this into account
1 parent 5e313a7 commit ada50b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

serde_derive/src/de.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,19 +1247,19 @@ fn prepare_enum_variant_enum(
12471247
}
12481248
};
12491249

1250-
let (ignore_variant, fallthrough) = if let Some(other_idx) = other_idx {
1250+
let fallthrough = if let Some(other_idx) = other_idx {
12511251
let ignore_variant = variant_names_idents[other_idx].1.clone();
12521252
let fallthrough = quote!(_serde::__private::Ok(__Field::#ignore_variant));
1253-
(None, Some(fallthrough))
1253+
Some(fallthrough)
12541254
} else {
1255-
(None, None)
1255+
None
12561256
};
12571257

12581258
let variant_visitor = Stmts(deserialize_generated_identifier(
12591259
&variant_names_idents,
12601260
cattrs,
12611261
true,
1262-
ignore_variant,
1262+
None,
12631263
fallthrough,
12641264
));
12651265

0 commit comments

Comments
 (0)