From a8f7326ee58185e3b2b95076b8542ef6afc80a5f Mon Sep 17 00:00:00 2001 From: Jay Somedon Date: Wed, 23 Dec 2020 22:19:27 +0800 Subject: Update condition check code style Co-authored-by: Jonas Schievink --- crates/proc_macro_api/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/proc_macro_api/src') diff --git a/crates/proc_macro_api/src/lib.rs b/crates/proc_macro_api/src/lib.rs index 34a4e68ab..481fb6dee 100644 --- a/crates/proc_macro_api/src/lib.rs +++ b/crates/proc_macro_api/src/lib.rs @@ -155,7 +155,7 @@ impl ProcMacroClient { let header = &dot_rustc[..8]; const EXPECTED_HEADER: [u8; 8] = [b'r', b'u', b's', b't', 0, 0, 0, 5]; // check if header is valid - if !(header == EXPECTED_HEADER) { + if header != EXPECTED_HEADER { return Err(io::Error::new(io::ErrorKind::InvalidData, format!(".rustc section should start with header {:?}; header {:?} is actually presented.",EXPECTED_HEADER ,header))); } -- cgit v1.2.3