Update condition check code style

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
Jay Somedon 2020-12-23 22:19:27 +08:00 committed by Edwin Cheng
parent c92db2abf9
commit a8f7326ee5

View File

@ -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)));
}