We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71c6836 commit 5ef9689Copy full SHA for 5ef9689
src/net/if_.rs
@@ -5,10 +5,10 @@
5
6
use libc::{c_uint, if_nametoindex};
7
use std::ffi::{CString, NulError};
8
-use ::Error;
+use ::{Result, Error};
9
10
/// Resolve an interface into a interface number.
11
-pub fn name_to_index(name: &str) -> Result<c_uint, Error> {
+pub fn name_to_index(name: &str) -> Result<c_uint> {
12
let name = match CString::new(name) {
13
Err(e) => match e { NulError(..) => {
14
// A NulError indicates that a '\0' was found inside the string,
0 commit comments