One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
e7540d2833
commit
8ba2f77148
138 changed files with 1328 additions and 1366 deletions
|
@ -78,22 +78,22 @@ fn parse_tabstop<'a>(
|
|||
) -> Result<&'a str> {
|
||||
let tabstop_start = text.len();
|
||||
let tabstop_index;
|
||||
if source.chars().next() == Some('{') {
|
||||
if source.starts_with('{') {
|
||||
let (index, rest) = parse_int(&source[1..])?;
|
||||
tabstop_index = index;
|
||||
source = rest;
|
||||
|
||||
if source.chars().next() == Some(':') {
|
||||
if source.starts_with(':') {
|
||||
source = parse_snippet(&source[1..], true, text, tabstops)?;
|
||||
}
|
||||
|
||||
if source.chars().next() == Some('}') {
|
||||
if source.starts_with('}') {
|
||||
source = &source[1..];
|
||||
} else {
|
||||
return Err(anyhow!("expected a closing brace"));
|
||||
}
|
||||
} else {
|
||||
let (index, rest) = parse_int(&source)?;
|
||||
let (index, rest) = parse_int(source)?;
|
||||
tabstop_index = index;
|
||||
source = rest;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue