cargo fmt

This commit is contained in:
BenjaminBrienen 2025-03-10 12:42:27 +01:00
parent 87f837cec7
commit 7535bb4661
571 changed files with 2210 additions and 2458 deletions

View file

@ -10,7 +10,7 @@ use serde_derive::{Deserialize, Serialize};
use crate::ProcMacroKind;
pub use self::flat::{
deserialize_span_data_index_map, serialize_span_data_index_map, FlatTree, SpanDataIndexMap,
FlatTree, SpanDataIndexMap, deserialize_span_data_index_map, serialize_span_data_index_map,
};
pub use span::TokenId;
@ -158,7 +158,7 @@ type ProtocolWrite<W: Write> = for<'o, 'msg> fn(out: &'o mut W, msg: &'msg str)
#[cfg(test)]
mod tests {
use intern::{sym, Symbol};
use intern::{Symbol, sym};
use span::{Edition, ErasedFileAstId, Span, SpanAnchor, SyntaxContext, TextRange, TextSize};
use tt::{
Delimiter, DelimiterKind, Ident, Leaf, Literal, Punct, Spacing, TopSubtree,

View file

@ -17,9 +17,9 @@ use std::{fmt, io, sync::Arc, time::SystemTime};
use crate::{
legacy_protocol::msg::{
deserialize_span_data_index_map, flat::serialize_span_data_index_map, ExpandMacro,
ExpandMacroData, ExpnGlobals, FlatTree, PanicMessage, Request, Response, SpanDataIndexMap,
HAS_GLOBAL_SPANS, RUST_ANALYZER_SPAN_SUPPORT,
ExpandMacro, ExpandMacroData, ExpnGlobals, FlatTree, HAS_GLOBAL_SPANS, PanicMessage,
RUST_ANALYZER_SPAN_SUPPORT, Request, Response, SpanDataIndexMap,
deserialize_span_data_index_map, flat::serialize_span_data_index_map,
},
process::ProcMacroServerProcess,
};
@ -102,7 +102,7 @@ impl ProcMacroClient {
pub fn spawn(
process_path: &AbsPath,
env: impl IntoIterator<Item = (impl AsRef<std::ffi::OsStr>, impl AsRef<std::ffi::OsStr>)>
+ Clone,
+ Clone,
) -> io::Result<ProcMacroClient> {
let process = ProcMacroServerProcess::run(process_path, env)?;
Ok(ProcMacroClient { process: Arc::new(process), path: process_path.to_owned() })

View file

@ -11,14 +11,14 @@ use paths::AbsPath;
use stdx::JodChild;
use crate::{
ProcMacroKind, ServerError,
legacy_protocol::{
json::{read_json, write_json},
msg::{
Message, Request, Response, ServerConfig, SpanMode, CURRENT_API_VERSION,
RUST_ANALYZER_SPAN_SUPPORT,
CURRENT_API_VERSION, Message, RUST_ANALYZER_SPAN_SUPPORT, Request, Response,
ServerConfig, SpanMode,
},
},
ProcMacroKind, ServerError,
};
#[derive(Debug)]
@ -43,7 +43,7 @@ impl ProcMacroServerProcess {
pub(crate) fn run(
process_path: &AbsPath,
env: impl IntoIterator<Item = (impl AsRef<std::ffi::OsStr>, impl AsRef<std::ffi::OsStr>)>
+ Clone,
+ Clone,
) -> io::Result<ProcMacroServerProcess> {
let create_srv = || {
let mut process = Process::run(process_path, env.clone())?;