Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
micahscopes committed Mar 6, 2024
1 parent 23cb6f1 commit bd01409
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions crates/language-server-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ use syn::{parse_macro_input, FnArg, ImplItem, ItemImpl, ReturnType};
#[proc_macro_attribute]
pub fn message_channels(attr: TokenStream, item: TokenStream) -> TokenStream {
let attr = parse_macro_input!(attr as Option<syn::Ident>);
let channel_struct_name = format_ident!("{}", attr.map_or("MessageChannels".to_string(), |attr| attr.to_string()));
let channel_struct_name = format_ident!(
"{}",
attr.map_or("MessageChannels".to_string(), |attr| attr.to_string())
);

let lang_server_trait_impl = parse_macro_input!(item as ItemImpl);

Expand Down Expand Up @@ -77,7 +80,10 @@ fn parse_method_calls(lang_server_trait: &ItemImpl) -> Vec<MessageTypeChannel> {
calls
}

fn gen_channel_struct(channels: &[MessageTypeChannel], channel_struct_name: syn::Ident) -> proc_macro2::TokenStream {
fn gen_channel_struct(
channels: &[MessageTypeChannel],
channel_struct_name: syn::Ident,
) -> proc_macro2::TokenStream {
// unit type
let unit_type = syn::Type::Tuple(syn::TypeTuple {
paren_token: syn::token::Paren::default(),
Expand Down
2 changes: 1 addition & 1 deletion crates/language-server/src/oneshot_responder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl<T: Debug + Clone> OneshotResponder<T> {
match sender.send(response) {
Ok(_) => {
debug!("Response sent successfully")
},
}
Err(e) => error!("Failed to send response: {:?}", e),
}
}
Expand Down

0 comments on commit bd01409

Please sign in to comment.