1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! The diffr engine: tree-sitter parsing, the structural diff, the wire
//! projection, configuration and the plugin cursor. Nothing here needs an
//! async runtime, threads, git, a component runtime or a terminal.
// I frequently develop difftastic on a newer rustc than the MSRV, so
// these two aren't relevant.
// This tends to trigger on larger tuples of simple types, and naming
// them would probably be worse for readability.
// == "" is often clearer when dealing with strings.
// It's common to have pairs foo_lhs and foo_rhs, leading to double
// the number of arguments and triggering this lint.
// Has false positives on else if chains that sometimes have the same
// body for readability.
// Good practice in general, but a necessary evil for Syntax. Its Hash
// implementation does not consider the mutable fields, so it is still
// correct.
// manual_unwrap_or_default was added in Rust 1.79, so earlier versions of
// clippy complain about allowing it.
// It's sometimes more readable to explicitly create a vec than to use
// the Default trait.
// I find the explicit arithmetic clearer sometimes.
// It's helpful being super explicit about byte length versus Unicode
// character point length sometimes.
// .to_owned() is more explicit on string references.
// .to_string() on a String is clearer as .clone().
// Debugging features shouldn't be in checked-in code.
extern crate log;
use cratesyntax;