Skip to content

Commit fe3c07f

Browse files
committed
Remove pad dependency
1 parent f0b515f commit fe3c07f

4 files changed

Lines changed: 1 addition & 16 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ itertools = "0.14.0"
3030
log = "0.4.27"
3131
lsp-types = "^0.95.1"
3232
lsp-server = "0.7.8"
33-
pad = "0.1.6"
3433
parking_lot = "0.12.3"
3534
pinned_vec = "0.1.1"
3635
quote = "1"

vhdl_lang/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ rust-version.workspace = true
1616

1717
[dependencies]
1818
vhdl_lang_macros = { version = "^0.86.0", path = "../vhdl_lang_macros" }
19-
pad.workspace = true
2019
fnv.workspace = true
2120
clap.workspace = true
2221
toml.workspace = true

vhdl_lang/src/data/source.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ impl SrcPos {
360360
context_lines: u32,
361361
) -> (usize, String) {
362362
let lines = self.get_line_context(context_lines, contents);
363-
use pad::{Alignment, PadStr};
364363
// +1 since lines are shown with 1-index
365364
let lineno_len = (self.range.start.line + context_lines + 1)
366365
.to_string()
@@ -371,9 +370,7 @@ impl SrcPos {
371370
for (lineno, line) in lines.iter() {
372371
let line = line.to_string();
373372
let line = line.trim_matches('\n');
374-
let lineno_str = (lineno + 1)
375-
.to_string()
376-
.pad_to_width_with_alignment(lineno_len, Alignment::Right);
373+
let lineno_str = format!("{:>lineno_len$}", lineno + 1);
377374
let overlaps = self.range.start.line <= *lineno && *lineno <= self.range.end.line;
378375

379376
if overlaps {

0 commit comments

Comments
 (0)