From 72cbca957c3938389916e1c3552133cd45fc4f33 Mon Sep 17 00:00:00 2001 From: shellrow <81893184+shellrow@users.noreply.github.com> Date: Sun, 27 Mar 2022 22:15:28 +0900 Subject: [PATCH] Update linux.rs --- src/interface/linux.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/interface/linux.rs b/src/interface/linux.rs index a576b64..134fdc4 100644 --- a/src/interface/linux.rs +++ b/src/interface/linux.rs @@ -1,10 +1,8 @@ use std::convert::TryFrom; use std::fs::read_to_string; +use crate::interface::InterfaceType; pub fn get_interface_type(if_name: String) -> InterfaceType { - use std::convert::TryFrom; - use std::fs::read_to_string; - let if_type_path: String = format!("/sys/class/net/{}/type", if_name); let r = read_to_string(if_type_path); let if_type_string = match r {