diff options
Diffstat (limited to 'helix-core/src/buffer.rs')
-rw-r--r-- | helix-core/src/buffer.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/helix-core/src/buffer.rs b/helix-core/src/buffer.rs deleted file mode 100644 index 746e01ea..00000000 --- a/helix-core/src/buffer.rs +++ /dev/null @@ -1,18 +0,0 @@ -use anyhow::Error; -use ropey::Rope; -use std::{env, fs::File, io::BufReader, path::PathBuf}; - -pub struct Buffer { - pub contents: Rope, -} - -impl Buffer { - pub fn load(path: PathBuf) -> Result<Self, Error> { - let _current_dir = env::current_dir()?; - - let contents = Rope::from_reader(BufReader::new(File::open(path)?))?; - - // TODO: create if not found - Ok(Buffer { contents }) - } -} |