One big cleanup pass of clippy lints

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
ForLoveOfCats
2022-08-10 16:51:01 -07:00
committed by K Simmons
co-authored by Mikayla
parent e7540d2833
commit 8ba2f77148
138 changed files with 1328 additions and 1366 deletions
+4 -4
View File
@@ -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;
}