1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00
This commit is contained in:
mat 2023-10-12 20:21:28 -05:00
parent d82230a427
commit f505ace721
2 changed files with 5 additions and 5 deletions

View file

@ -323,7 +323,7 @@ impl<S> CommandDispatcher<S> {
prefix: &str,
restricted: bool,
) {
if restricted && !node.can_use(&source) {
if restricted && !node.can_use(source) {
return;
}
if node.command.is_some() {
@ -345,7 +345,7 @@ impl<S> CommandDispatcher<S> {
let child = child.read();
self.get_all_usage_recursive(
&child,
&source,
source,
result,
if prefix.is_empty() {
child.usage_text()
@ -388,7 +388,7 @@ impl<S> CommandDispatcher<S> {
optional: bool,
deep: bool,
) -> Option<String> {
if !node.can_use(&source) {
if !node.can_use(source) {
return None;
}
@ -417,7 +417,7 @@ impl<S> CommandDispatcher<S> {
let children = node
.children
.values()
.filter(|child| child.read().can_use(&source))
.filter(|child| child.read().can_use(source))
.collect::<Vec<_>>();
match children.len().cmp(&1) {
Ordering::Less => {}

View file

@ -110,7 +110,7 @@ impl McBufReadable for Suggestions<FormattedText> {
.map(|s| Suggestion {
value: SuggestionValue::Text(s.text),
tooltip: s.tooltip,
range: range.clone(),
range,
})
.collect::<Vec<_>>();
suggestions.sort_by(|a, b| a.value.cmp(&b.value));