aboutsummaryrefslogtreecommitdiff
path: root/crates/proc_macro_api
diff options
context:
space:
mode:
authorJay Somedon <[email protected]>2020-12-23 14:19:27 +0000
committerEdwin Cheng <[email protected]>2021-03-04 01:11:43 +0000
commita8f7326ee58185e3b2b95076b8542ef6afc80a5f (patch)
treee292a73e13663918f4509a441b1945b991489fb1 /crates/proc_macro_api
parentc92db2abf989e76f6c6a4407c5ac3bfa7262c19a (diff)
Update condition check code style
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/proc_macro_api')
-rw-r--r--crates/proc_macro_api/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
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 {
155 let header = &dot_rustc[..8]; 155 let header = &dot_rustc[..8];
156 const EXPECTED_HEADER: [u8; 8] = [b'r', b'u', b's', b't', 0, 0, 0, 5]; 156 const EXPECTED_HEADER: [u8; 8] = [b'r', b'u', b's', b't', 0, 0, 0, 5];
157 // check if header is valid 157 // check if header is valid
158 if !(header == EXPECTED_HEADER) { 158 if header != EXPECTED_HEADER {
159 return Err(io::Error::new(io::ErrorKind::InvalidData, format!(".rustc section should start with header {:?}; header {:?} is actually presented.",EXPECTED_HEADER ,header))); 159 return Err(io::Error::new(io::ErrorKind::InvalidData, format!(".rustc section should start with header {:?}; header {:?} is actually presented.",EXPECTED_HEADER ,header)));
160 } 160 }
161 161