Skip to content

Commit 1ce8a75

Browse files
authored
feat(edit): Expose Table::span (#1031)
Looking at 444036e, it doesn't make sense why `Table::span` was made private. All other major types expose their spans, regardless of what quality of meaning or meaning changes. Fixes #1029
2 parents b2bc739 + 290c28f commit 1ce8a75

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

crates/toml_edit/src/table.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,10 @@ impl Table {
273273
.map(|(_, key, _)| key.as_mut())
274274
}
275275

276-
/// Returns the location within the original document
277-
pub(crate) fn span(&self) -> Option<std::ops::Range<usize>> {
276+
/// The location within the original document
277+
///
278+
/// This generally requires a [`Document`][crate::Document].
279+
pub fn span(&self) -> Option<std::ops::Range<usize>> {
278280
self.span.clone()
279281
}
280282

0 commit comments

Comments
 (0)