summaryrefslogtreecommitdiffstats
path: root/src/poem/elements/verse
diff options
context:
space:
mode:
authorRory Dudley2024-09-02 22:23:01 -0600
committerRory Dudley2024-09-02 22:36:15 -0600
commit51fcf2efdaae8bdd5270cfe64de1522eadd1775f (patch)
treec8022679dfea1351b5aabe15d37a1415d40c62e8 /src/poem/elements/verse
parent49676c0e1c5fd0660edfd73cfd97001a00b7bd8b (diff)
downloaddwarvish-51fcf2efdaae8bdd5270cfe64de1522eadd1775f.tar.gz
Refactor Verse::clause()
There is no reason to return an option for clause(), since it makes us perform a match twice, and since a blank vector is perfectly acceptable in all cases where the verse at hand may not have a clause. Signed-off-by: Rory Dudley <rory@netc.lu>
Diffstat (limited to 'src/poem/elements/verse')
-rw-r--r--src/poem/elements/verse/logic.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/poem/elements/verse/logic.rs b/src/poem/elements/verse/logic.rs
index e7ed4df..41b736b 100644
--- a/src/poem/elements/verse/logic.rs
+++ b/src/poem/elements/verse/logic.rs
@@ -15,7 +15,7 @@
#[macro_export]
macro_rules! incant {
($verb:expr, $command:expr, $out:expr, $pids:expr, $env:expr, $self:expr) => {{
- $command.args($self.clause().unwrap_or(vec![]));
+ $command.args($self.clause());
// Determine couplet status
if $self.couplet == 1 {