mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +00:00
refactor: remove unused function
This commit is contained in:
parent
cd4f66b144
commit
fe21dd7821
1 changed files with 1 additions and 17 deletions
|
@ -134,23 +134,7 @@ impl Children {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn drain_comment<F: FnMut(String)>(&mut self, mut callback: F) {
|
||||
if let Some(child) = self.peek_next() {
|
||||
if let rnix::SyntaxKind::TOKEN_COMMENT = child.element.kind() {
|
||||
callback(
|
||||
child
|
||||
.element
|
||||
.as_token()
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.text()
|
||||
.to_string(),
|
||||
);
|
||||
self.move_next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// #[deprecated]
|
||||
pub fn drain_comments<F: FnMut(String)>(&mut self, mut callback: F) {
|
||||
while let Some(child) = self.peek_next() {
|
||||
match child.element.kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue