aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/buffer.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-09-07 02:28:52 +0000
committerBlaž Hrastnik2020-09-07 02:28:52 +0000
commit8b3e152126ec8f0e67dad378dc62c734ea97a4b0 (patch)
tree5109f5fb4a7709eafd2fb3b493c6e7d56e269e5a /helix-core/src/buffer.rs
parent579b6899f1fe7f0a06857c4528f55f316e2975e9 (diff)
cleanup: Make Buffer just a part of State.
Diffstat (limited to 'helix-core/src/buffer.rs')
-rw-r--r--helix-core/src/buffer.rs18
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 })
- }
-}