Fix clippy lints

Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Change-Id: Idfd8209650a7525a49240fe79a7e6245bbb99f95
diff --git a/src/boot_info.rs b/src/boot_info.rs
index 446ff08..c9c45fb 100644
--- a/src/boot_info.rs
+++ b/src/boot_info.rs
@@ -124,10 +124,10 @@
     fn from(value: BootInfoType) -> Self {
         match value {
             BootInfoType::Std(std_type) => {
-                std_type as u8 | BootInfoType::TYPE_STANDARD << BootInfoType::TYPE_SHIFT
+                std_type as u8 | (BootInfoType::TYPE_STANDARD << BootInfoType::TYPE_SHIFT)
             }
             BootInfoType::Impdef(impdef_type) => {
-                impdef_type.0 | BootInfoType::TYPE_IMPDEF << BootInfoType::TYPE_SHIFT
+                impdef_type.0 | (BootInfoType::TYPE_IMPDEF << BootInfoType::TYPE_SHIFT)
             }
         }
     }
diff --git a/src/lib.rs b/src/lib.rs
index d4855b8..466ec0a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -142,7 +142,7 @@
 
 impl From<TargetInfo> for u32 {
     fn from(value: TargetInfo) -> Self {
-        (value.endpoint_id as u32) << 16 | value.vcpu_id as u32
+        ((value.endpoint_id as u32) << 16) | value.vcpu_id as u32
     }
 }
 
@@ -165,7 +165,7 @@
 
 impl From<Version> for u32 {
     fn from(v: Version) -> Self {
-        (v.0 as u32) << 16 | v.1 as u32
+        ((v.0 as u32) << 16) | v.1 as u32
     }
 }
 
@@ -870,7 +870,7 @@
                 flags,
                 args,
             } => {
-                a[1] = (src_id as u64) << 16 | dst_id as u64;
+                a[1] = ((src_id as u64) << 16) | dst_id as u64;
                 a[2] = flags.into();
                 match args {
                     DirectMsgArgs::Args32(args) => {
@@ -895,7 +895,7 @@
                 flags,
                 args,
             } => {
-                a[1] = (src_id as u64) << 16 | dst_id as u64;
+                a[1] = ((src_id as u64) << 16) | dst_id as u64;
                 a[2] = flags.into();
                 match args {
                     DirectMsgArgs::Args32(args) => {
diff --git a/src/memory_management.rs b/src/memory_management.rs
index e81a5ca..925fe44 100644
--- a/src/memory_management.rs
+++ b/src/memory_management.rs
@@ -61,7 +61,7 @@
 
 impl From<[u32; 2]> for Handle {
     fn from(value: [u32; 2]) -> Self {
-        Self((value[1] as u64) << 32 | value[0] as u64)
+        Self(((value[1] as u64) << 32) | value[0] as u64)
     }
 }
 
@@ -200,11 +200,11 @@
     fn from(value: MemType) -> Self {
         match value {
             MemType::NotSpecified => MemType::NOT_SPECIFIED << MemType::SHIFT,
-            MemType::Device(attr) => attr as u16 | MemType::DEVICE << MemType::SHIFT,
+            MemType::Device(attr) => attr as u16 | (MemType::DEVICE << MemType::SHIFT),
             MemType::Normal {
                 cacheability,
                 shareability,
-            } => cacheability as u16 | shareability as u16 | MemType::NORMAL << MemType::SHIFT,
+            } => cacheability as u16 | shareability as u16 | (MemType::NORMAL << MemType::SHIFT),
         }
     }
 }