summaryrefslogtreecommitdiffstats
path: root/src/recite.rs
diff options
context:
space:
mode:
authorRory Dudley2024-03-02 20:48:29 -0700
committerRory Dudley2024-03-02 20:48:29 -0700
commitd1c1d2db8d796190afe1e2f7128414cd34424080 (patch)
tree56b2d90c5e4460457230f7d3bf4e2d083ed00b06 /src/recite.rs
parentc87fa3f288447d6913ffa561849b90bf8e24da54 (diff)
downloaddwarvish-d1c1d2db8d796190afe1e2f7128414cd34424080.tar.gz
Cleanup comments
Remove commented code relating to error checks for the incant_io functions. The parser should detect if no files where specified for Meter::Read, Meter::Write, or Meter::Addendum, meaning that these checks are not necessary.
Diffstat (limited to 'src/recite.rs')
-rw-r--r--src/recite.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/recite.rs b/src/recite.rs
index d4128b7..1beee96 100644
--- a/src/recite.rs
+++ b/src/recite.rs
@@ -186,14 +186,6 @@ impl Meter {
/// and that will be used to store the contents of the
/// file paths in `next`
fn incant_read(verse: &Verse, paths: &Verse, out: &mut String) -> Result<i32, io::Error> {
- // // If there are no more verses, throw an error
- // if i + 1 >= verses.len() {
- // return Err(std::io::Error::new(
- // io::ErrorKind::NotFound,
- // "read file(s) not specified",
- // ));
- // }
-
// Read all file specified in the next verse into 'out', since there
// may also be piped output from the last command
for path in paths.stanza().iter() {
@@ -220,14 +212,6 @@ impl Meter {
/// and that will be used to store the contents of the
/// file paths in `next`
fn incant_write(verse: &Verse, paths: &Verse, out: &mut String) -> Result<i32, io::Error> {
- // If there are no more verses, throw an error
- // if i + 1 >= verses.len() {
- // return Err(std::io::Error::new(
- // io::ErrorKind::NotFound,
- // "write file(s) not specified",
- // ));
- // }
-
// Alias incant_couplet
let status = Meter::incant_couplet(verse, out)?;
@@ -253,14 +237,6 @@ impl Meter {
/// and that will be used to store the contents of the
/// file paths in `next`
fn incant_addendum(verse: &Verse, paths: &Verse, out: &mut String) -> Result<i32, io::Error> {
- // If there are no more verses, throw an error
- // if i + 1 >= verses.len() {
- // return Err(std::io::Error::new(
- // io::ErrorKind::NotFound,
- // "write file(s) not specified",
- // ));
- // }
-
// Alias incant_couplet
let status = Meter::incant_couplet(verse, out)?;