ksud: migrate to Rust 2024 edition
This commit is contained in:
@@ -5,11 +5,11 @@ use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use std::process::Stdio;
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use anyhow::bail;
|
||||
use anyhow::ensure;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use regex_lite::Regex;
|
||||
use which::which;
|
||||
|
||||
@@ -97,7 +97,7 @@ pub fn get_current_kmi() -> Result<String> {
|
||||
}
|
||||
|
||||
fn parse_kmi_from_kernel(kernel: &PathBuf, workdir: &Path) -> Result<String> {
|
||||
use std::fs::{copy, File};
|
||||
use std::fs::{File, copy};
|
||||
use std::io::{BufReader, Read};
|
||||
let kernel_path = workdir.join("kernel");
|
||||
copy(kernel, &kernel_path).context("Failed to copy kernel")?;
|
||||
|
||||
Reference in New Issue
Block a user