mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-24 20:42:29 +00:00
rust update, nix update, clippy fixes
This commit is contained in:
parent
32fcb38a94
commit
e784baccce
37 changed files with 289 additions and 244 deletions
|
@ -21,9 +21,9 @@ use crate::{Ast, Buf};
|
|||
/// The number of spaces to indent.
|
||||
pub const INDENT: u16 = 4;
|
||||
|
||||
pub fn fmt_default_spaces<'a, 'buf>(
|
||||
buf: &mut Buf<'buf>,
|
||||
spaces: &[CommentOrNewline<'a>],
|
||||
pub fn fmt_default_spaces(
|
||||
buf: &mut Buf,
|
||||
spaces: &[CommentOrNewline],
|
||||
indent: u16,
|
||||
) {
|
||||
if spaces.is_empty() {
|
||||
|
@ -32,9 +32,9 @@ pub fn fmt_default_spaces<'a, 'buf>(
|
|||
fmt_spaces(buf, spaces.iter(), indent);
|
||||
}
|
||||
}
|
||||
pub fn fmt_default_newline<'a, 'buf>(
|
||||
buf: &mut Buf<'buf>,
|
||||
spaces: &[CommentOrNewline<'a>],
|
||||
pub fn fmt_default_newline(
|
||||
buf: &mut Buf,
|
||||
spaces: &[CommentOrNewline],
|
||||
indent: u16,
|
||||
) {
|
||||
if spaces.is_empty() {
|
||||
|
@ -153,7 +153,7 @@ pub fn fmt_comments_only<'a, 'buf, I>(
|
|||
}
|
||||
}
|
||||
|
||||
fn fmt_comment<'buf>(buf: &mut Buf<'buf>, comment: &str) {
|
||||
fn fmt_comment(buf: &mut Buf, comment: &str) {
|
||||
// The '#' in a comment should always be preceded by a newline or a space,
|
||||
// unless it's the very beginning of the buffer.
|
||||
if !buf.is_empty() && !buf.ends_with_space() && !buf.ends_with_newline() {
|
||||
|
@ -192,7 +192,7 @@ where
|
|||
count
|
||||
}
|
||||
|
||||
fn fmt_docs<'buf>(buf: &mut Buf<'buf>, docs: &str) {
|
||||
fn fmt_docs(buf: &mut Buf, docs: &str) {
|
||||
// The "##" in a doc comment should always be preceded by a newline or a space,
|
||||
// unless it's the very beginning of the buffer.
|
||||
if !buf.is_empty() && !buf.ends_with_space() && !buf.ends_with_newline() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue