Skip to content

Commit 5ef9689

Browse files
committed
Use nix::Result explicitly.
1 parent 71c6836 commit 5ef9689

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net/if_.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
66
use libc::{c_uint, if_nametoindex};
77
use std::ffi::{CString, NulError};
8-
use ::Error;
8+
use ::{Result, Error};
99

1010
/// Resolve an interface into a interface number.
11-
pub fn name_to_index(name: &str) -> Result<c_uint, Error> {
11+
pub fn name_to_index(name: &str) -> Result<c_uint> {
1212
let name = match CString::new(name) {
1313
Err(e) => match e { NulError(..) => {
1414
// A NulError indicates that a '\0' was found inside the string,

0 commit comments

Comments
 (0)