mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
clippy
This commit is contained in:
parent
d82230a427
commit
f505ace721
2 changed files with 5 additions and 5 deletions
|
@ -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 => {}
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue