Skip to content

Commit ced4b3e

Browse files
committed
Fix rustc hanging
1 parent 11222fd commit ced4b3e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

vm/src/stdlib/pystruct.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ mod _struct {
267267
Ok(codes)
268268
}
269269

270-
#[rustfmt::skip] // rustfmt makes it way too long
270+
#[allow(clippy::match_like_matches_macro)] // if we change it to matches!() rustc hangs forever
271271
fn is_supported_format_character(c: char) -> bool {
272-
matches!(
273-
c,
272+
match c {
274273
'x' | 'c' | 'b' | 'B' | '?' | 'h' | 'H' | 'i' | 'I' | 'l' | 'L' | 'q' | 'Q' | 'n'
275-
| 'N' | 'f' | 'd' | 's' | 'p' | 'P'
276-
)
274+
| 'N' | 'f' | 'd' | 's' | 'p' | 'P' => true,
275+
_ => false,
276+
}
277277
}
278278

279279
fn get_int_or_index<T>(vm: &VirtualMachine, arg: &PyObjectRef) -> PyResult<T>

0 commit comments

Comments
 (0)