diff options
| author | mat <github@matdoes.dev> | 2022-04-17 15:57:28 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-04-17 15:57:28 -0500 |
| commit | 2e904225611b66fa72b082e4f5e188b55b333fcd (patch) | |
| tree | 5def0247b2a721ea20eded8ac996d957c591a403 /azalea-brigadier/src/builder/required_argument_builder.rs | |
| parent | 10cd1733cbba5c637fa0130a0cd7a7ab6e618226 (diff) | |
| download | azalea-drasl-2e904225611b66fa72b082e4f5e188b55b333fcd.tar.xz | |
Fix clippy issues and add a couple tests to dispatcher
Diffstat (limited to 'azalea-brigadier/src/builder/required_argument_builder.rs')
| -rw-r--r-- | azalea-brigadier/src/builder/required_argument_builder.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/azalea-brigadier/src/builder/required_argument_builder.rs b/azalea-brigadier/src/builder/required_argument_builder.rs index 9cd089de..0eb5d11a 100644 --- a/azalea-brigadier/src/builder/required_argument_builder.rs +++ b/azalea-brigadier/src/builder/required_argument_builder.rs @@ -16,7 +16,7 @@ impl Argument { pub fn new(name: &str, parser: Rc<dyn Parser>) -> Self { Self { name: name.to_string(), - parser: parser, + parser, } } @@ -41,9 +41,6 @@ impl Debug for Argument { } /// Shortcut for creating a new argument builder node. -pub fn argument<'a, S: Any + Clone>( - name: &'a str, - parser: impl Parser + 'static, -) -> ArgumentBuilder<S> { +pub fn argument<S: Any + Clone>(name: &str, parser: impl Parser + 'static) -> ArgumentBuilder<S> { ArgumentBuilder::new(Argument::new(name, Rc::new(parser)).into()) } |
