chore(cli): apply clippy fixes
This commit is contained in:
parent
1fb16a72ac
commit
04ff704bca
49 changed files with 1094 additions and 1277 deletions
|
|
@ -78,14 +78,14 @@ fn test_node_and_cursor_ref_in_fut() {
|
|||
|
||||
let fut_val = async {
|
||||
yield_now().await;
|
||||
root.to_sexp();
|
||||
let _ = root.to_sexp();
|
||||
};
|
||||
|
||||
yield_now().await;
|
||||
|
||||
let fut_ref = async {
|
||||
yield_now().await;
|
||||
root_ref.to_sexp();
|
||||
let _ = root_ref.to_sexp();
|
||||
cursor_ref.goto_first_child();
|
||||
};
|
||||
|
||||
|
|
@ -117,14 +117,14 @@ fn test_node_and_cursor_ref_in_fut_with_fut_fabrics() {
|
|||
|
||||
let fut_val = || async {
|
||||
yield_now().await;
|
||||
root.to_sexp();
|
||||
let _ = root.to_sexp();
|
||||
};
|
||||
|
||||
yield_now().await;
|
||||
|
||||
let fut_ref = || async move {
|
||||
yield_now().await;
|
||||
root_ref.to_sexp();
|
||||
let _ = root_ref.to_sexp();
|
||||
cursor_ref.goto_first_child();
|
||||
};
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ fn test_node_and_cursor_ref_in_fut_with_inner_spawns() {
|
|||
let mut cursor = tree.walk();
|
||||
let cursor_ref = &mut cursor;
|
||||
yield_now().await;
|
||||
root.to_sexp();
|
||||
let _ = root.to_sexp();
|
||||
cursor_ref.goto_first_child();
|
||||
}
|
||||
};
|
||||
|
|
@ -172,7 +172,7 @@ fn test_node_and_cursor_ref_in_fut_with_inner_spawns() {
|
|||
let mut cursor = tree.walk();
|
||||
let cursor_ref = &mut cursor;
|
||||
yield_now().await;
|
||||
root_ref.to_sexp();
|
||||
let _ = root_ref.to_sexp();
|
||||
cursor_ref.goto_first_child();
|
||||
}
|
||||
};
|
||||
|
|
@ -228,7 +228,7 @@ async fn yield_now() {
|
|||
type Output = ();
|
||||
|
||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
|
||||
cx.waker().clone().wake();
|
||||
cx.waker().wake_by_ref();
|
||||
if self.yielded {
|
||||
return Poll::Ready(());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ fn test_language_corpus(
|
|||
let tree = parser.parse(&test.input, None).unwrap();
|
||||
let mut actual_output = tree.root_node().to_sexp();
|
||||
if !test.has_fields {
|
||||
actual_output = strip_sexp_fields(actual_output);
|
||||
actual_output = strip_sexp_fields(&actual_output);
|
||||
}
|
||||
|
||||
if actual_output != test.output {
|
||||
|
|
@ -253,7 +253,7 @@ fn test_language_corpus(
|
|||
// Verify that the final tree matches the expectation from the corpus.
|
||||
let mut actual_output = tree3.root_node().to_sexp();
|
||||
if !test.has_fields {
|
||||
actual_output = strip_sexp_fields(actual_output);
|
||||
actual_output = strip_sexp_fields(&actual_output);
|
||||
}
|
||||
|
||||
if actual_output != test.output {
|
||||
|
|
@ -382,7 +382,7 @@ fn test_feature_corpus_files() {
|
|||
let tree = parser.parse(&test.input, None).unwrap();
|
||||
let mut actual_output = tree.root_node().to_sexp();
|
||||
if !test.has_fields {
|
||||
actual_output = strip_sexp_fields(actual_output);
|
||||
actual_output = strip_sexp_fields(&actual_output);
|
||||
}
|
||||
if actual_output == test.output {
|
||||
true
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ fn test_lookahead_iterator() {
|
|||
lookahead.reset_state(next_state);
|
||||
assert!(lookahead.iter_names().eq(expected_symbols));
|
||||
|
||||
lookahead.reset(language.clone(), next_state);
|
||||
lookahead.reset(&language, next_state);
|
||||
assert!(lookahead
|
||||
.map(|s| language.node_kind_for_id(s).unwrap())
|
||||
.eq(expected_symbols));
|
||||
|
|
|
|||
|
|
@ -4188,7 +4188,7 @@ fn test_query_is_pattern_guaranteed_at_step() {
|
|||
];
|
||||
|
||||
allocations::record(|| {
|
||||
eprintln!("");
|
||||
eprintln!();
|
||||
|
||||
for row in rows.iter() {
|
||||
if let Some(filter) = EXAMPLE_FILTER.as_ref() {
|
||||
|
|
@ -4283,7 +4283,7 @@ fn test_query_is_pattern_rooted() {
|
|||
];
|
||||
|
||||
allocations::record(|| {
|
||||
eprintln!("");
|
||||
eprintln!();
|
||||
|
||||
let language = get_language("python");
|
||||
for row in &rows {
|
||||
|
|
@ -4381,7 +4381,7 @@ fn test_query_is_pattern_non_local() {
|
|||
];
|
||||
|
||||
allocations::record(|| {
|
||||
eprintln!("");
|
||||
eprintln!();
|
||||
|
||||
for row in &rows {
|
||||
if let Some(filter) = EXAMPLE_FILTER.as_ref() {
|
||||
|
|
@ -4611,7 +4611,7 @@ fn test_capture_quantifiers() {
|
|||
];
|
||||
|
||||
allocations::record(|| {
|
||||
eprintln!("");
|
||||
eprintln!();
|
||||
|
||||
for row in rows.iter() {
|
||||
if let Some(filter) = EXAMPLE_FILTER.as_ref() {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ fn test_highlight_test_with_basic_test() {
|
|||
.join("\n");
|
||||
|
||||
let assertions =
|
||||
parse_position_comments(&mut Parser::new(), language, source.as_bytes()).unwrap();
|
||||
parse_position_comments(&mut Parser::new(), &language, source.as_bytes()).unwrap();
|
||||
assert_eq!(
|
||||
assertions,
|
||||
&[
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ fn test_tags_test_with_basic_test() {
|
|||
.join("\n");
|
||||
|
||||
let assertions =
|
||||
parse_position_comments(&mut Parser::new(), language, source.as_bytes()).unwrap();
|
||||
parse_position_comments(&mut Parser::new(), &language, source.as_bytes()).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
assertions,
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ fn test_tree_cursor() {
|
|||
assert_eq!(cursor.node().start_position(), Point { row: 1, column: 29 });
|
||||
|
||||
let mut copy = tree.walk();
|
||||
copy.reset_to(cursor);
|
||||
copy.reset_to(&cursor);
|
||||
|
||||
assert_eq!(copy.node().kind(), "{");
|
||||
assert_eq!(copy.node().is_named(), false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue