summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs5
-rw-r--r--src/plugin/vcpu.rs5
2 files changed, 2 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index 144e49c..e33be66 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -38,10 +38,7 @@ use vm_control::{
 };
 
 fn executable_is_plugin(executable: &Option<Executable>) -> bool {
-    match executable {
-        Some(Executable::Plugin(_)) => true,
-        _ => false,
-    }
+    matches!(executable, Some(Executable::Plugin(_)))
 }
 
 // Wait for all children to exit. Return true if they have all exited, false
diff --git a/src/plugin/vcpu.rs b/src/plugin/vcpu.rs
index 3bb6bed..a5bf73c 100644
--- a/src/plugin/vcpu.rs
+++ b/src/plugin/vcpu.rs
@@ -323,10 +323,7 @@ enum VcpuRunData<'a> {
 
 impl<'a> VcpuRunData<'a> {
     fn is_write(&self) -> bool {
-        match self {
-            VcpuRunData::Write(_) => true,
-            _ => false,
-        }
+        matches!(self, VcpuRunData::Write(_))
     }
 
     fn as_slice(&self) -> &[u8] {