mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
many clippy fixes
This commit is contained in:
parent
7bbb37a843
commit
9748e4a4dc
17 changed files with 455 additions and 600 deletions
|
@ -21,22 +21,14 @@ use crate::{Ast, Buf};
|
|||
/// The number of spaces to indent.
|
||||
pub const INDENT: u16 = 4;
|
||||
|
||||
pub fn fmt_default_spaces(
|
||||
buf: &mut Buf,
|
||||
spaces: &[CommentOrNewline],
|
||||
indent: u16,
|
||||
) {
|
||||
pub fn fmt_default_spaces(buf: &mut Buf, spaces: &[CommentOrNewline], indent: u16) {
|
||||
if spaces.is_empty() {
|
||||
buf.spaces(1);
|
||||
} else {
|
||||
fmt_spaces(buf, spaces.iter(), indent);
|
||||
}
|
||||
}
|
||||
pub fn fmt_default_newline(
|
||||
buf: &mut Buf,
|
||||
spaces: &[CommentOrNewline],
|
||||
indent: u16,
|
||||
) {
|
||||
pub fn fmt_default_newline(buf: &mut Buf, spaces: &[CommentOrNewline], indent: u16) {
|
||||
if spaces.is_empty() {
|
||||
buf.newline();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue