Skip to content

Commit

Permalink
suppress dead_code warning on Literal command node
Browse files Browse the repository at this point in the history
  • Loading branch information
user622628252416 committed Aug 20, 2024
1 parent 4bc1f7b commit 413f88d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pumpkin/src/commands/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
1 change: 1 addition & 0 deletions pumpkin/src/commands/tree_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 413f88d

Please sign in to comment.