Use a single SourceCodeLocator everywhere (#510)

This commit is contained in:
Charlie Marsh 2022-10-29 18:23:24 -04:00 committed by GitHub
parent 2fcbf3ab62
commit db59d5b558
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 66 deletions

View file

@ -27,7 +27,7 @@ pub fn leading_space(line: &str) -> String {
/// Extract the leading indentation from a docstring.
pub fn indentation<'a>(checker: &'a Checker, docstring: &Expr) -> &'a str {
let range = Range::from_located(docstring);
checker.get_locator().slice_source_code_range(&Range {
checker.locator.slice_source_code_range(&Range {
location: Location::new(range.location.row(), 1),
end_location: Location::new(range.location.row(), range.location.column()),
})