Fix clippy lints in proc-macro-srv

This commit is contained in:
Lukas Wirth 2024-12-12 13:30:42 +01:00
parent c9314d4aff
commit 8a86fa01ac
6 changed files with 12 additions and 11 deletions

View file

@ -498,7 +498,7 @@ mod tests {
})),
tt::TokenTree::Leaf(tt::Leaf::Ident(tt::Ident {
sym: Symbol::intern("T"),
span: span,
span,
is_raw: tt::IdentIsRaw::No,
})),
tt::TokenTree::Subtree(tt::Subtree {

View file

@ -99,7 +99,7 @@ pub(super) struct TokenStreamBuilder<S> {
}
/// pub(super)lic implementation details for the `TokenStream` type, such as iterators.
pub(super) mod token_stream {
pub(super) mod token_stream_impls {
use core::fmt;
@ -137,6 +137,7 @@ pub(super) mod token_stream {
}
}
#[allow(clippy::to_string_trait_impl)]
impl<S> ToString for TokenStream<S> {
fn to_string(&self) -> String {
::tt::pretty(&self.token_trees)
@ -150,7 +151,7 @@ impl<S> TokenStreamBuilder<S> {
}
pub(super) fn push(&mut self, stream: TokenStream<S>) {
self.acc.extend(stream.into_iter())
self.acc.extend(stream)
}
pub(super) fn build(self) -> TokenStream<S> {