Skip to content

Commit 00eca98

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a75f743 commit 00eca98

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/djls-template-ast/src/ast.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl LineOffsets {
5656

5757
pub fn position_to_line_col(&self, offset: u32) -> (u32, u32) {
5858
eprintln!("LineOffsets: Converting position {} to line/col. Offsets: {:?}", offset, self.0);
59-
59+
6060
// Find which line contains this offset by looking for the first line start
6161
// that's greater than our position
6262
let line = match self.0.binary_search(&offset) {
@@ -76,10 +76,10 @@ impl LineOffsets {
7676
}
7777
}
7878
};
79-
79+
8080
// Calculate column as offset from line start
8181
let col = offset - self.0[line];
82-
82+
8383
eprintln!("LineOffsets: Found line {} starting at offset {}", line, self.0[line]);
8484
eprintln!("LineOffsets: Calculated col {} as {} - {}", col, offset, self.0[line]);
8585
(line as u32, col)

crates/djls-template-ast/src/lexer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl Lexer {
6161
'\n' => {
6262
self.consume()?;
6363
let token = TokenType::Newline;
64-
eprintln!("Lexer: Found newline at position {}, incrementing line from {} to {}",
64+
eprintln!("Lexer: Found newline at position {}, incrementing line from {} to {}",
6565
self.start, self.line, self.line + 1);
6666
self.line += 1;
6767
token

0 commit comments

Comments
 (0)