Skip to content

Commit

Permalink
fix(edit)!: Remove deprecated Error::line_col function
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 27, 2023
1 parent 688edee commit 656ec56
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
9 changes: 0 additions & 9 deletions crates/toml_edit/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ impl Error {
pub(crate) fn set_span(&mut self, span: Option<std::ops::Range<usize>>) {
self.inner.set_span(span);
}

/// Produces a (line, column) pair of the position of the error if available
///
/// All indexes are 0-based.
#[deprecated(since = "0.18.0", note = "See instead `Error::span`")]
pub fn line_col(&self) -> Option<(usize, usize)> {
#[allow(deprecated)]
self.inner.line_col()
}
}

impl serde::de::Error for Error {
Expand Down
12 changes: 0 additions & 12 deletions crates/toml_edit/src/parser/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,6 @@ impl TomlError {
pub(crate) fn set_original(&mut self, original: Option<String>) {
self.original = original;
}

/// Produces a (line, column) pair of the position of the error if available
///
/// All indexes are 0-based.
#[deprecated(since = "0.18.0", note = "See instead `TomlError::span`")]
pub fn line_col(&self) -> Option<(usize, usize)> {
if let (Some(original), Some(span)) = (&self.original, self.span()) {
Some(translate_position(original.as_bytes(), span.start))
} else {
None
}
}
}

/// Displays a TOML parse error
Expand Down

0 comments on commit 656ec56

Please sign in to comment.