mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
agent: clippy: fix cargo clippy warnings
Replace "if let Ok(_) = ..." with ".is_ok()" method. Fixes: #7284 Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
This commit is contained in:
parent
c4771d9e89
commit
46b81dd7d2
@ -33,7 +33,7 @@ pub fn create_pci_root_bus_path() -> String {
|
||||
|
||||
// check if there is pci bus path for acpi
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user