From 03dfa5fcc1d4129ebcf3b6a6fcba56e1f2aebdf7 Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 16 Oct 2026 13:30:50 +0200 Subject: [PATCH] Reformat with the current nightly rustfmt rustfmt 1.11.0-nightly (2026-10-15) formats two method chains and a struct literal differently, which fails the Format check on main. Apply cargo +nightly fmt; there are no other changes. --- slicec/src/patchers/type_ref_patcher.rs | 5 ++++- slicec/src/validators/parameters.rs | 21 ++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/slicec/src/patchers/type_ref_patcher.rs b/slicec/src/patchers/type_ref_patcher.rs index cadf1166..98e6a4fe 100644 --- a/slicec/src/patchers/type_ref_patcher.rs +++ b/slicec/src/patchers/type_ref_patcher.rs @@ -33,7 +33,10 @@ impl TypeRefPatcher<'_> { self.resolve_definition(type_ref, ast).map(PatchKind::FieldType) } Node::Interface(interface_ptr) => { - interface_ptr.borrow().bases.iter() + interface_ptr + .borrow() + .bases + .iter() .map(|type_ref| self.resolve_definition(type_ref, ast)) .collect::>>() // None if any of the bases couldn't be resolved. .map(PatchKind::BaseInterfaces) diff --git a/slicec/src/validators/parameters.rs b/slicec/src/validators/parameters.rs index e309b88c..1fa4252a 100644 --- a/slicec/src/validators/parameters.rs +++ b/slicec/src/validators/parameters.rs @@ -13,10 +13,15 @@ fn at_most_one_stream_parameter(members: &[&Parameter], diagnostics: &mut Diagno let streamed_members = members.iter().filter(|member| member.is_streamed).collect::>(); if streamed_members.len() > 1 { streamed_members - .split_last() // Split at the last element, which is the one we do not want to report an error for. - .unwrap().1 // All members before the split. Safe to unwrap since we know there are at least two members. - .iter() - .for_each(|m| Diagnostic::from_error(Error::MultipleStreamedMembers).set_span(m.span()).push_into(diagnostics)); + .split_last() // Split at the last element, which is the one we do not want to report an error for. + .unwrap() + .1 // All members before the split. Safe to unwrap since we know there are at least two members. + .iter() + .for_each(|m| { + Diagnostic::from_error(Error::MultipleStreamedMembers) + .set_span(m.span()) + .push_into(diagnostics) + }); } } @@ -38,8 +43,10 @@ fn stream_parameter_is_last(members: &[&Parameter], diagnostics: &mut Diagnostic .into_iter() .filter(|m| m.is_streamed) .for_each(|m| { - Diagnostic::from_error(Error::StreamedMembersMustBeLast { parameter_identifier: m.identifier().to_owned() }) - .set_span(m.span()) - .push_into(diagnostics); + Diagnostic::from_error(Error::StreamedMembersMustBeLast { + parameter_identifier: m.identifier().to_owned(), + }) + .set_span(m.span()) + .push_into(diagnostics); }); }