Skip to content

Commit d25c8d4

Browse files
committed
Extract LineIndex type that is backed by an Arc
1 parent d9a3769 commit d25c8d4

File tree

10 files changed

+465
-335
lines changed

10 files changed

+465
-335
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ruff_diagnostics/src/diagnostic.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ impl Diagnostic {
5858

5959
/// Set the [`Fix`] used to fix the diagnostic, if the provided function returns `Ok`.
6060
/// Otherwise, log the error.
61+
#[inline]
6162
pub fn try_set_fix<T: Into<Fix>>(&mut self, func: impl FnOnce() -> Result<T>) {
6263
match func() {
6364
Ok(fix) => self.fix = fix.into(),
@@ -66,6 +67,7 @@ impl Diagnostic {
6667
}
6768

6869
/// Set the location of the diagnostic's parent node.
70+
#[inline]
6971
pub fn set_parent(&mut self, parent: Location) {
7072
self.parent = Some(parent);
7173
}

crates/ruff_python_ast/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rust-version = { workspace = true }
99

1010
[dependencies]
1111
ruff_rustpython = { path = "../ruff_rustpython" }
12+
ruff_text_size = { path = "../ruff_text_size" }
1213

1314
anyhow = { workspace = true }
1415
bitflags = { workspace = true }

0 commit comments

Comments
 (0)