diff options
Diffstat (limited to 'src/poem/anthology')
-rw-r--r-- | src/poem/anthology/alias.rs | 2 | ||||
-rw-r--r-- | src/poem/anthology/source.rs | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/poem/anthology/alias.rs b/src/poem/anthology/alias.rs index 511bd3a..45ee7f2 100644 --- a/src/poem/anthology/alias.rs +++ b/src/poem/anthology/alias.rs @@ -40,7 +40,7 @@ pub fn incant(verse: &Verse, out: &mut Vec<u8>, aliases: &mut HashMap<String, St lines.push(line); } - if verse.couplet { + if verse.couplet > 0 { *out = format!("{}\n", lines.join("\n")).as_bytes().to_vec(); } else { println!("{}", lines.join("\n")); diff --git a/src/poem/anthology/source.rs b/src/poem/anthology/source.rs index 43d6204..3c81110 100644 --- a/src/poem/anthology/source.rs +++ b/src/poem/anthology/source.rs @@ -42,9 +42,7 @@ pub fn incant(verse: &Verse, out: &mut Vec<u8>, env: &mut Environment) -> i32 { } }; - let stdout = if verse.couplet { Some(true) } else { None }; - - *out = match poem.recite(env, stdout) { + *out = match poem.recite(env) { Ok(out) => out, Err(e) => { eprintln!("dwvsh: {}", e.to_string().to_lowercase()); |