Implement quickfixes for redundant imports.

This commit is contained in:
KtorZ
2023-10-22 00:29:09 +02:00
parent 28b699c86a
commit 46c58dbd61
4 changed files with 248 additions and 73 deletions

View File

@@ -1591,14 +1591,18 @@ impl ExtraData for Warning {
| Warning::Todo { .. }
| Warning::UnexpectedTypeHole { .. }
| Warning::UnusedConstructor { .. }
| Warning::UnusedImportedModule { .. }
| Warning::UnusedImportedValue { .. }
| Warning::UnusedPrivateFunction { .. }
| Warning::UnusedPrivateModuleConstant { .. }
| Warning::UnusedType { .. }
| Warning::UnusedVariable { .. }
| Warning::Utf8ByteArrayIsValidHexString { .. }
| Warning::ValidatorInLibraryModule { .. } => None,
Warning::UnusedImportedModule { location, .. } => {
Some(format!("{},{}", false, location.start))
}
Warning::UnusedImportedValueOrType { location, .. } => {
Some(format!("{},{}", true, location.start))
}
}
}
}