Skip to content

Commit 656ec56

Browse files
committed
fix(edit)!: Remove deprecated Error::line_col function
1 parent 688edee commit 656ec56

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

crates/toml_edit/src/de/mod.rs

-9
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@ impl Error {
5555
pub(crate) fn set_span(&mut self, span: Option<std::ops::Range<usize>>) {
5656
self.inner.set_span(span);
5757
}
58-
59-
/// Produces a (line, column) pair of the position of the error if available
60-
///
61-
/// All indexes are 0-based.
62-
#[deprecated(since = "0.18.0", note = "See instead `Error::span`")]
63-
pub fn line_col(&self) -> Option<(usize, usize)> {
64-
#[allow(deprecated)]
65-
self.inner.line_col()
66-
}
6758
}
6859

6960
impl serde::de::Error for Error {

crates/toml_edit/src/parser/errors.rs

-12
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,6 @@ impl TomlError {
7272
pub(crate) fn set_original(&mut self, original: Option<String>) {
7373
self.original = original;
7474
}
75-
76-
/// Produces a (line, column) pair of the position of the error if available
77-
///
78-
/// All indexes are 0-based.
79-
#[deprecated(since = "0.18.0", note = "See instead `TomlError::span`")]
80-
pub fn line_col(&self) -> Option<(usize, usize)> {
81-
if let (Some(original), Some(span)) = (&self.original, self.span()) {
82-
Some(translate_position(original.as_bytes(), span.start))
83-
} else {
84-
None
85-
}
86-
}
8775
}
8876

8977
/// Displays a TOML parse error

0 commit comments

Comments
 (0)