From 1415c8f9b89699000ef8d864ff8f0e1bebca4a5f Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Thu, 4 Apr 2024 22:12:14 -0600 Subject: Handle aliases in read() Instead of handling aliases in the recite() function, which requires two loops to handle properly with the current implementation, offload checking for aliases to the read() function. --- src/poem/anthology/alias.rs | 2 +- src/poem/anthology/source.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/poem/anthology') diff --git a/src/poem/anthology/alias.rs b/src/poem/anthology/alias.rs index 0183ec2..4c9b7b6 100644 --- a/src/poem/anthology/alias.rs +++ b/src/poem/anthology/alias.rs @@ -39,7 +39,7 @@ pub fn incant(verse: &Verse, out: &mut String, aliases: &mut HashMap i32 { } }; - let poem = match Poem::read(poetry) { + let poem = match Poem::read(poetry, env) { Ok(poem) => poem, Err(e) => { eprintln!("dwvsh: {}", e.to_string().to_lowercase()); -- cgit v1.2.3