Skip to content

Commit cbadb35

Browse files
committed
clippy fix and fmt
1 parent 014c7c5 commit cbadb35

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: src/document.rs

+3-3
Original file line numberDiff line numberDiff 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');

Diff for: src/fmt.rs

+1-1
Original file line numberDiff line numberDiff 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

Diff for: src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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

0 commit comments

Comments
 (0)