diff --git a/aya/src/util.rs b/aya/src/util.rs index f3b68017..93df51fb 100644 --- a/aya/src/util.rs +++ b/aya/src/util.rs @@ -130,7 +130,7 @@ impl KernelVersion { } fn get_kernel_version() -> Result { - if let Some(v) = Self::get_ubuntu_kernel_version()? { + if let Ok(Some(v)) = Self::get_ubuntu_kernel_version() { return Ok(v); } @@ -139,7 +139,7 @@ impl KernelVersion { return Err(io::Error::last_os_error().into()); } - if let Some(v) = Self::get_debian_kernel_version(&info)? { + if let Ok(Some(v)) = Self::get_debian_kernel_version(&info) { return Ok(v); }