File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -245,15 +245,15 @@ impl KdlDocument {
245
245
246
246
/// Formats the document according to `config`.
247
247
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 ( ) {
249
249
crate :: fmt:: autoformat_leading ( leading, config) ;
250
250
}
251
251
let mut has_nodes = false ;
252
- for node in & mut ( & mut * self ) . nodes {
252
+ for node in & mut self . nodes {
253
253
has_nodes = true ;
254
254
node. autoformat_config ( config) ;
255
255
}
256
- if let Some ( KdlDocumentFormat { trailing, .. } ) = ( & mut * self ) . format_mut ( ) {
256
+ if let Some ( KdlDocumentFormat { trailing, .. } ) = ( * self ) . format_mut ( ) {
257
257
crate :: fmt:: autoformat_trailing ( trailing, config. no_comments ) ;
258
258
if !has_nodes {
259
259
trailing. push ( '\n' ) ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl<'a> FormatConfigBuilder<'a> {
81
81
82
82
/// The indentation to use at each level.
83
83
/// 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 < ' _ > {
85
85
FormatConfigBuilder ( FormatConfig { indent, ..self . 0 } )
86
86
}
87
87
Original file line number Diff line number Diff line change 15
15
//!
16
16
//! This crate supports parsing [KDL
17
17
//! 2.0.0-draft.6](https://github.com/kdl-org/kdl/releases/tag/2.0.0-draft.6)
18
- //!
18
+ //!
19
19
//! ## Example
20
20
//!
21
21
//! ```rust
You can’t perform that action at this time.
0 commit comments