From 413f88d14589757d28175bb36e3e141bab308181 Mon Sep 17 00:00:00 2001 From: user622628252416 Date: Tue, 20 Aug 2024 16:51:44 +0200 Subject: [PATCH] suppress dead_code warning on Literal command node --- pumpkin/src/commands/tree.rs | 1 + pumpkin/src/commands/tree_builder.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/pumpkin/src/commands/tree.rs b/pumpkin/src/commands/tree.rs index 492214e69..68d9bd30b 100644 --- a/pumpkin/src/commands/tree.rs +++ b/pumpkin/src/commands/tree.rs @@ -20,6 +20,7 @@ pub(crate) enum NodeType<'a> { ExecuteLeaf { run: &'a (dyn Fn(&mut CommandSender, &ConsumedArgs) -> Result<(), InvalidTreeError> + Sync), }, + #[allow(dead_code)] // todo: remove (so far no commands requiring this are implemented) Literal { string: &'a str, }, diff --git a/pumpkin/src/commands/tree_builder.rs b/pumpkin/src/commands/tree_builder.rs index 28f721217..c4ec99178 100644 --- a/pumpkin/src/commands/tree_builder.rs +++ b/pumpkin/src/commands/tree_builder.rs @@ -115,6 +115,7 @@ impl <'a>NonLeafNodeBuilder<'a> { } /// Matches a sting literal. +#[allow(dead_code)] // todo: remove (so far no commands requiring this are implemented) pub fn literal(string: &str) -> NonLeafNodeBuilder { NonLeafNodeBuilder { node_type: NodeType::Literal {