1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

Clean up some old stuff

This commit is contained in:
mat 2022-04-17 14:03:21 -05:00
parent a72a47ced7
commit 82ed6baea5
3 changed files with 0 additions and 91 deletions

50
Cargo.lock generated
View file

@ -70,11 +70,6 @@ dependencies = [
[[package]]
name = "azalea-brigadier"
version = "0.1.0"
dependencies = [
"dyn-clonable",
"enum_dispatch",
"lazy_static",
]
[[package]]
name = "azalea-chat"
@ -338,33 +333,6 @@ version = "2.3.2"
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"
@ -383,18 +351,6 @@ dependencies = [
"syn",
]
[[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"
@ -730,12 +686,6 @@ dependencies = [
"libc",
]
[[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"

View file

@ -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"

View file

@ -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()
);
}