File tree 1 file changed +13
-12
lines changed 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -170,21 +170,22 @@ impl<'de> serde::de::Deserialize<'de> for SerdePspEntrySourceValue {
170
170
where
171
171
A : serde:: de:: MapAccess < ' de > ,
172
172
{
173
- while let Some ( key) = map. next_key :: < String > ( ) ? {
174
- if key == "PspSoftFuseChain" {
175
- let value = map . next_value :: < PspSoftFuseChain > ( ) ? ;
176
- return Ok ( SerdePspEntrySourceValue :: PspSoftFuseChain (
177
- value ,
178
- ) ) ;
179
- } else {
180
- return Err ( serde:: de:: Error :: custom (
173
+ if let Some ( key) = map. next_key :: < String > ( ) ? {
174
+ match key. as_str ( ) {
175
+ "PspSoftFuseChain" => {
176
+ Ok ( SerdePspEntrySourceValue :: PspSoftFuseChain (
177
+ map . next_value :: < PspSoftFuseChain > ( ) ? ,
178
+ ) )
179
+ }
180
+ _ => Err ( serde:: de:: Error :: custom (
181
181
"expected SerdePspEntrySourceValue variant" ,
182
- ) ) ;
182
+ ) ) ,
183
183
}
184
+ } else {
185
+ Err ( serde:: de:: Error :: custom (
186
+ "expected SerdePspEntrySourceValue variant" ,
187
+ ) )
184
188
}
185
- Err ( serde:: de:: Error :: custom (
186
- "expected SerdePspEntrySourceValue variant" ,
187
- ) )
188
189
}
189
190
}
190
191
You can’t perform that action at this time.
0 commit comments