use super::*;
use std::fs::File;
use std::io::Read;

pub enum OpenStatus {
    Ok,
    NotFound,
}

impl Editor {
    /// Open a file
    pub fn open(&mut self, path: &str) -> OpenStatus {
        self.status_bar.file = path.to_string();
        if let Some(mut file) = File::open(path).ok() {
            let mut con = String::new();
            file.read_to_string(&mut con);

            self.text = con.lines()
                           .map(|x| x.chars().collect::<VecDeque<char>>())
                           .collect::<VecDeque<VecDeque<char>>>();

            OpenStatus::Ok
        } else {
            OpenStatus::NotFound
        }

    }
}

use super::*;
use std::fs::File;
use std::io::Read;

pub enum OpenStatus {
    Ok,
    NotFound,
}

impl Editor {
    /// Open a file
    pub fn open(&mut self, path: &str) -> OpenStatus {
        self.status_bar.file = path.to_string();
        if let Some(mut file) = File::open(path) {
            let mut con = String::new();
            file.read_to_string(&mut con);

            self.text = con.lines()
                           .map(|x| x.chars().collect::<VecDeque<char>>())
                           .collect::<VecDeque<VecDeque<char>>>();

            OpenStatus::Ok
        } else {
            OpenStatus::NotFound
        }

    }
}

--- 
+++ 
@@ -11,7 +11,7 @@
     /// Open a file
     pub fn open(&mut self, path: &str) -> OpenStatus {
         self.status_bar.file = path.to_string();
-        if let Some(mut file) = File::open(path) {
+        if let Some(mut file) = File::open(path).ok() {
             let mut con = String::new();
             file.read_to_string(&mut con);
 
Add error codes
Switch to using Result in io functions
Remove outdated ZFS scheme, as the ZFS app has new development
