move disk::utils to crates::utils

This commit is contained in:
weisd
2025-06-11 11:50:14 +08:00
parent 2eeb9dbcbc
commit e8a59d7c07
57 changed files with 289 additions and 1158 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ pub fn get_available_port() -> u16 {
}
/// returns IPs of local interface
pub(crate) fn must_get_local_ips() -> std::io::Result<Vec<IpAddr>> {
pub fn must_get_local_ips() -> std::io::Result<Vec<IpAddr>> {
match netif::up() {
Ok(up) => Ok(up.map(|x| x.address().to_owned()).collect()),
Err(err) => Err(std::io::Error::other(format!("Unable to get IP addresses of this host: {}", err))),