You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A spurious semicolon meant this function was returning () rather than some form of io::Result. I feel the error message could have been more helpful, since the type was just plain wrong, rather than inadequately specified.
use std::fs::File;
use std::io;
use std::os::unix::io::AsRawFd;
use std::path::Path;
A spurious semicolon meant this function was returning () rather than some form of io::Result. I feel the error message could have been more helpful, since the type was just plain wrong, rather than inadequately specified.
use std::fs::File;
use std::io;
use std::os::unix::io::AsRawFd;
use std::path::Path;
pub struct DMIoctl {
// FIXME: automate closing the fd
control_file: File
}
static IOCTL_CONTROL_PATH: &'static Path = Path::new("/dev/mapper/control");
impl DMIoctl {
fn new_specifying_control<P: AsRef>(path: &P) -> io::Result {
let i = DMIoctl { control_file: try!(File::open(path)) };
[E0282]
//main.rs:21 Ok(i);
^~
}
fn new() -> io::Result {
Self::new_specifying_control(IOCTL_CONTROL_PATH);
}
}
The text was updated successfully, but these errors were encountered: