Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bebert64 committed Dec 13, 2023
1 parent 0e1ceb8 commit 0f920eb
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions crates/taplo/src/formatter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
//! The formatting can be done on documents that might
//! contain invalid syntax. In that case the invalid part is skipped.

use {
crate::{
dom::{self, node::DomNode, FromSyntax, Keys, Node},
syntax::{SyntaxElement, SyntaxKind::*, SyntaxNode, SyntaxToken},
util::overlaps,
},
once_cell::unsync::OnceCell,
rowan::{GreenNode, NodeOrToken, TextRange},
std::{
cmp,
iter::{repeat, FromIterator},
ops::Range,
rc::Rc,
},
use crate::{
dom::{self, node::DomNode, FromSyntax, Keys, Node},
syntax::{SyntaxElement, SyntaxKind::*, SyntaxNode, SyntaxToken},
util::overlaps,
};
use once_cell::unsync::OnceCell;
use rowan::{GreenNode, NodeOrToken, TextRange};
use std::{
cmp,
iter::{repeat, FromIterator},
ops::Range,
rc::Rc,
};

#[cfg(feature = "serde")]
Expand Down Expand Up @@ -361,8 +359,8 @@ fn format_impl(node: SyntaxNode, options: Options, context: Context) -> String {
struct FormattedEntry {
syntax: SyntaxElement,
key: String,
// This field is used to cache the "cleaned" version of the key and should only
// be accessed through the `cleaned_key` helpers method.
/// This field is used to cache the "cleaned" version of the key and should only
/// be accessed through the `cleaned_key` helpers method.
cleaned_key: OnceCell<Vec<String>>,
value: String,
comment: Option<String>,
Expand Down

0 comments on commit 0f920eb

Please sign in to comment.