Skip to content

Commit

Permalink
Extend de::Error::span() documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed May 18, 2023
1 parent 30ea1fc commit d2e5d04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/toml/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ impl Error {

/// The start/end index (byte offset) into the original document where the error occurred.
///
/// If you deserialize from a &str, you should (nearly) always get a span. Any missing span is
/// If you deserialize from a `&str`, you should (nearly) always get a span. Any missing span is
/// more likely to be a bug. If you deserialize from a Document, all span information is lost
/// and this method will always return `None`
/// and this method will always return `None`.
#[cfg(feature = "parse")]
pub fn span(&self) -> Option<std::ops::Range<usize>> {
self.inner.span()
Expand Down

0 comments on commit d2e5d04

Please sign in to comment.