Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit a7d4a8c

Browse files
committed
Clean up lifetimes on Src
1 parent 9ddbb5a commit a7d4a8c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/harness.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,14 @@ crate fn compare_json(actual: &serde_json::Value, expected: &str) {
291291
}
292292

293293
#[derive(Clone, Copy, Debug)]
294-
crate struct Src<'a, 'b> {
294+
crate struct Src<'a> {
295295
crate file_name: &'a Path,
296296
// 1 indexed
297297
crate line: usize,
298-
crate name: &'b str,
298+
crate name: &'a str,
299299
}
300300

301-
crate fn src<'a, 'b>(file_name: &'a Path, line: usize, name: &'b str) -> Src<'a, 'b> {
301+
crate fn src<'a>(file_name: &'a Path, line: usize, name: &'a str) -> Src<'a> {
302302
Src {
303303
file_name,
304304
line,
@@ -319,7 +319,7 @@ impl Cache {
319319
}
320320
}
321321

322-
crate fn mk_ls_position(&mut self, src: Src<'_, '_>) -> ls_types::Position {
322+
crate fn mk_ls_position(&mut self, src: Src<'_>) -> ls_types::Position {
323323
let line = self.get_line(src);
324324
let col = line
325325
.find(src.name)
@@ -352,7 +352,7 @@ impl Cache {
352352
}
353353
}
354354

355-
fn get_line(&mut self, src: Src<'_, '_>) -> String {
355+
fn get_line(&mut self, src: Src<'_>) -> String {
356356
let base_path = &self.base_path;
357357
let lines = self
358358
.files

0 commit comments

Comments
 (0)