aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock50
-rw-r--r--azalea-brigadier/Cargo.toml3
-rw-r--r--azalea-brigadier/src/main.rs38
3 files changed, 0 insertions, 91 deletions
diff --git a/Cargo.lock b/Cargo.lock
index d52792ce..67259fef 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -70,11 +70,6 @@ dependencies = [
[[package]]
name = "azalea-brigadier"
version = "0.1.0"
-dependencies = [
- "dyn-clonable",
- "enum_dispatch",
- "lazy_static",
-]
[[package]]
name = "azalea-chat"
@@ -339,33 +334,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57"
[[package]]
-name = "dyn-clonable"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4"
-dependencies = [
- "dyn-clonable-impl",
- "dyn-clone",
-]
-
-[[package]]
-name = "dyn-clonable-impl"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "dyn-clone"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf"
-
-[[package]]
name = "either"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -384,18 +352,6 @@ dependencies = [
]
[[package]]
-name = "enum_dispatch"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd53b3fde38a39a06b2e66dc282f3e86191e53bd04cc499929c15742beae3df8"
-dependencies = [
- "once_cell",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "flate2"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -731,12 +687,6 @@ dependencies = [
]
[[package]]
-name = "once_cell"
-version = "1.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
-
-[[package]]
name = "oorandom"
version = "11.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/azalea-brigadier/Cargo.toml b/azalea-brigadier/Cargo.toml
index 6dead502..a7ebf618 100644
--- a/azalea-brigadier/Cargo.toml
+++ b/azalea-brigadier/Cargo.toml
@@ -6,6 +6,3 @@ version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-lazy_static = "^1.4"
-dyn-clonable = "^0.9"
-enum_dispatch = "^0.3"
diff --git a/azalea-brigadier/src/main.rs b/azalea-brigadier/src/main.rs
deleted file mode 100644
index 53f2efa8..00000000
--- a/azalea-brigadier/src/main.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-use std::rc::Rc;
-
-use rust_command_parser::{
- builder::{literal_argument_builder::literal, required_argument_builder::argument},
- dispatcher::CommandDispatcher,
- parsers::integer,
-};
-
-struct CommandSourceStack {
- player: String,
-}
-
-pub fn main() {
- let mut dispatcher = CommandDispatcher::<Rc<CommandSourceStack>>::new();
-
- let source = Rc::new(CommandSourceStack {
- player: "player".to_string(),
- });
-
- dispatcher.register(
- literal("foo")
- .then(argument("bar", integer()).executes(|c| {
- // println!("Bar is {}", get_integer(c, "bar"));
- 2
- }))
- .executes(|c| {
- println!("Called foo with no arguments");
- 1
- }),
- );
-
- let parse = dispatcher.parse("foo 123".to_string().into(), source);
- println!("{:?}", parse);
- println!(
- "{}",
- CommandDispatcher::<Rc<CommandSourceStack>>::execute(parse).unwrap()
- );
-}