From d1c1d2db8d796190afe1e2f7128414cd34424080 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Sat, 2 Mar 2024 20:48:29 -0700 Subject: 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. --- src/recite.rs | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src') 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 { - // // 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 { - // 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 { - // 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)?; -- cgit v1.2.3