We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11222fd commit ced4b3eCopy full SHA for ced4b3e
1 file changed
vm/src/stdlib/pystruct.rs
@@ -267,13 +267,13 @@ mod _struct {
267
Ok(codes)
268
}
269
270
- #[rustfmt::skip] // rustfmt makes it way too long
+ #[allow(clippy::match_like_matches_macro)] // if we change it to matches!() rustc hangs forever
271
fn is_supported_format_character(c: char) -> bool {
272
- matches!(
273
- c,
+ match c {
274
'x' | 'c' | 'b' | 'B' | '?' | 'h' | 'H' | 'i' | 'I' | 'l' | 'L' | 'q' | 'Q' | 'n'
275
- | 'N' | 'f' | 'd' | 's' | 'p' | 'P'
276
- )
+ | 'N' | 'f' | 'd' | 's' | 'p' | 'P' => true,
+ _ => false,
+ }
277
278
279
fn get_int_or_index<T>(vm: &VirtualMachine, arg: &PyObjectRef) -> PyResult<T>
0 commit comments