Skip to content

Commit

Permalink
removed unneeded method
Browse files Browse the repository at this point in the history
  • Loading branch information
geremachek committed Jul 25, 2021
1 parent ab66783 commit 031c6c1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "merlin"
version = "1.0.10"
version = "1.0.11"
authors = ["geremachek <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion src/plane/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl Plane {
Command::Carve => cvol.carve()?,
Command::Carved => return oksome(cvol.carved()),
_ => { // we are modifying the buffer...
cvol.set_written(false);
cvol.written = false;

match command {
Command::Inscribe => cvol.inscribe(&data[0]),
Expand Down
8 changes: 1 addition & 7 deletions src/volume/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@ pub struct Volume {
line: usize,
cursor: usize,

written: bool,
pub written: bool,
}

impl Volume {
// set written to a boolean value

pub fn set_written(&mut self, w: bool) {
self.written = w;
}

// create a buffer with some existing text

pub fn from_text(contents: String) -> Volume {
Expand Down
2 changes: 1 addition & 1 deletion src/volume/vol_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl Volume {
let mut file = File::create(&name).or(Err(MerlinError::CreationFailed))?;
file.write_all(&(self.buffer.join("\n") + "\n").as_bytes()).or(Err(MerlinError::WriteFailed))?;

self.set_written(true);
self.written = true;
Ok(())
}
None => Err(MerlinError::BufferNotNamed),
Expand Down

0 comments on commit 031c6c1

Please sign in to comment.