docs: Mention comments and whitespace in `format` accessors (#124)

This commit is contained in:
James Munns 2025-04-08 11:46:47 +02:00 committed by GitHub
parent c904e025a2
commit c1680e8c04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -193,7 +193,7 @@ impl KdlDocument {
&mut self.nodes
}
/// Gets the formatting details for this entry.
/// Gets the formatting details (including whitespace and comments) for this entry.
pub fn format(&self) -> Option<&KdlDocumentFormat> {
self.format.as_ref()
}

View File

@ -112,7 +112,7 @@ impl KdlEntry {
self.ty = Some(ty.into());
}
/// Gets the formatting details for this entry.
/// Gets the formatting details (including whitespace and comments) for this entry.
pub fn format(&self) -> Option<&KdlEntryFormat> {
self.format.as_ref()
}

View File

@ -246,7 +246,7 @@ impl KdlNode {
self.children_mut().as_mut().unwrap()
}
/// Gets the formatting details for this node.
/// Gets the formatting details (including whitespace and comments) for this node.
pub fn format(&self) -> Option<&KdlNodeFormat> {
self.format.as_ref()
}