diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net/if_.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/if_.rs b/src/net/if_.rs index 11370386..6a55738b 100644 --- a/src/net/if_.rs +++ b/src/net/if_.rs @@ -5,10 +5,10 @@ use libc::{c_uint, if_nametoindex}; use std::ffi::{CString, NulError}; -use ::Error; +use ::{Result, Error}; /// Resolve an interface into a interface number. -pub fn name_to_index(name: &str) -> Result<c_uint, Error> { +pub fn name_to_index(name: &str) -> Result<c_uint> { let name = match CString::new(name) { Err(e) => match e { NulError(..) => { // A NulError indicates that a '\0' was found inside the string, |