rust update, nix update, clippy fixes

This commit is contained in:
Anton-4 2023-04-22 14:51:01 +02:00
parent 32fcb38a94
commit e784baccce
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
37 changed files with 289 additions and 244 deletions

View file

@ -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() {