Skip to content

Commit

Permalink
token_stream_utils went to the types_reader library
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Sep 24, 2023
1 parent f026932 commit beb7a6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 181 deletions.
1 change: 0 additions & 1 deletion my-grpc-server-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use proc_macro::TokenStream;

mod generate_server_stream;
mod tokens_stream_utils;
mod with_result_stream;
mod with_telemetry;

Expand Down
179 changes: 0 additions & 179 deletions my-grpc-server-macros/src/tokens_stream_utils.rs

This file was deleted.

3 changes: 2 additions & 1 deletion my-grpc-server-macros/src/with_telemetry/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use proc_macro::Delimiter;
use proc_macro::Group;
use proc_macro::TokenStream;
use quote::ToTokens;
use types_reader::token_stream_utils::*;

pub fn generate(
_attr: TokenStream,
Expand Down Expand Up @@ -67,7 +68,7 @@ fn inject_body(fn_name: &str, group: &Group) -> proc_macro2::TokenStream {
let tokens_to_insert: Vec<proc_macro2::TokenTree> =
to_inject.into_token_stream().into_iter().collect();

let result = crate::tokens_stream_utils::insert_inside_token(
let result = insert_token_before_sequence(
group.stream().into(),
&["let", "request", "=", "request", ".", "into_inner"],
tokens_to_insert,
Expand Down

0 comments on commit beb7a6e

Please sign in to comment.