File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -245,15 +245,15 @@ impl KdlDocument {
245245
246246 /// Formats the document according to `config`.
247247 pub fn autoformat_config ( & mut self , config : & FormatConfig < ' _ > ) {
248- if let Some ( KdlDocumentFormat { leading, .. } ) = ( & mut * self ) . format_mut ( ) {
248+ if let Some ( KdlDocumentFormat { leading, .. } ) = ( * self ) . format_mut ( ) {
249249 crate :: fmt:: autoformat_leading ( leading, config) ;
250250 }
251251 let mut has_nodes = false ;
252- for node in & mut ( & mut * self ) . nodes {
252+ for node in & mut self . nodes {
253253 has_nodes = true ;
254254 node. autoformat_config ( config) ;
255255 }
256- if let Some ( KdlDocumentFormat { trailing, .. } ) = ( & mut * self ) . format_mut ( ) {
256+ if let Some ( KdlDocumentFormat { trailing, .. } ) = ( * self ) . format_mut ( ) {
257257 crate :: fmt:: autoformat_trailing ( trailing, config. no_comments ) ;
258258 if !has_nodes {
259259 trailing. push ( '\n' ) ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl<'a> FormatConfigBuilder<'a> {
8181
8282 /// The indentation to use at each level.
8383 /// Defaults to four spaces if not specified.
84- pub const fn indent < ' b > ( self , indent : & ' b str ) -> FormatConfigBuilder < ' b > {
84+ pub const fn indent ( self , indent : & str ) -> FormatConfigBuilder < ' _ > {
8585 FormatConfigBuilder ( FormatConfig { indent, ..self . 0 } )
8686 }
8787
Original file line number Diff line number Diff line change 1515//!
1616//! This crate supports parsing [KDL
1717//! 2.0.0-draft.6](https://github.com/kdl-org/kdl/releases/tag/2.0.0-draft.6)
18- //!
18+ //!
1919//! ## Example
2020//!
2121//! ```rust
You can’t perform that action at this time.
0 commit comments