Skip to content

Commit 290c28f

Browse files
committed
feat(edit): Expose Table::span
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
1 parent bd21148 commit 290c28f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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)