From ced4b3e3614d797f7550f73f20ec22c7b40e92bb Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Fri, 9 Oct 2020 22:24:10 -0500 Subject: [PATCH] Fix rustc hanging --- vm/src/stdlib/pystruct.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vm/src/stdlib/pystruct.rs b/vm/src/stdlib/pystruct.rs index ae900f0e3..23ff16eb1 100644 --- a/vm/src/stdlib/pystruct.rs +++ b/vm/src/stdlib/pystruct.rs @@ -267,13 +267,13 @@ mod _struct { Ok(codes) } - #[rustfmt::skip] // rustfmt makes it way too long + #[allow(clippy::match_like_matches_macro)] // if we change it to matches!() rustc hangs forever fn is_supported_format_character(c: char) -> bool { - matches!( - c, + match c { 'x' | 'c' | 'b' | 'B' | '?' | 'h' | 'H' | 'i' | 'I' | 'l' | 'L' | 'q' | 'Q' | 'n' - | 'N' | 'f' | 'd' | 's' | 'p' | 'P' - ) + | 'N' | 'f' | 'd' | 's' | 'p' | 'P' => true, + _ => false, + } } fn get_int_or_index(vm: &VirtualMachine, arg: &PyObjectRef) -> PyResult