Skip to content

Commit 57ac019

Browse files
redsun82Copilot
andcommitted
Fix formatting
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d16bc36 commit 57ac019

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

shared/tree-sitter-extractor/src/extractor/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ pub fn extract(
299299
) {
300300
let path_str = file_paths::normalize_and_transform_path(path, transformer);
301301
let source_root = std::env::current_dir().ok();
302-
let diagnostics_path =
303-
file_paths::relativize_for_diagnostic(path, source_root.as_deref());
302+
let diagnostics_path = file_paths::relativize_for_diagnostic(path, source_root.as_deref());
304303
let span = tracing::span!(
305304
tracing::Level::TRACE,
306305
"extract",

shared/tree-sitter-extractor/src/file_paths.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,14 @@ mod tests {
251251
#[test]
252252
fn relativize_under_source_root() {
253253
let path = Path::new("/home/runner/work/repo/src/foo.rb");
254-
let result =
255-
relativize_for_diagnostic(path, Some(Path::new("/home/runner/work/repo")));
254+
let result = relativize_for_diagnostic(path, Some(Path::new("/home/runner/work/repo")));
256255
assert_eq!(result, "src/foo.rb");
257256
}
258257

259258
#[test]
260259
fn relativize_outside_source_root_produces_file_uri() {
261260
let path = Path::new("/other/location/foo.rb");
262-
let result =
263-
relativize_for_diagnostic(path, Some(Path::new("/home/runner/work/repo")));
261+
let result = relativize_for_diagnostic(path, Some(Path::new("/home/runner/work/repo")));
264262
assert_eq!(result, "file:///other/location/foo.rb");
265263
}
266264

0 commit comments

Comments
 (0)