1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-08-24 18:52:08 +00:00

agent: clippy: fix cargo clippy warnings

Replace "if let Ok(_) = ..." with ".is_ok()" method.

Fixes: 

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
This commit is contained in:
xuejun-xj 2023-07-10 15:53:41 +08:00
parent c4771d9e89
commit 46b81dd7d2

View File

@ -33,7 +33,7 @@ pub fn create_pci_root_bus_path() -> String {
// check if there is pci bus path for acpi // check if there is pci bus path for acpi
acpi_sysfs_dir.push_str(&acpi_root_bus_path); acpi_sysfs_dir.push_str(&acpi_root_bus_path);
if let Ok(_) = fs::metadata(&acpi_sysfs_dir) { if fs::metadata(&acpi_sysfs_dir).is_ok() {
return acpi_root_bus_path; return acpi_root_bus_path;
} }