use BytesPattern for {binnpat, binnpats} without crate prefix

This commit is contained in:
Dmitry Belyaev 2022-08-27 23:57:43 +03:00
parent f4274d703d
commit c3bf670f19
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3
2 changed files with 1 additions and 5 deletions

View File

@ -9,7 +9,7 @@ use std::fs;
use std::fs::{File, OpenOptions}; use std::fs::{File, OpenOptions};
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
use binnpatch::{ApplyPatch, FindPattern}; use binnpatch::{ApplyPatch, BytesPattern, FindPattern};
use binnpatch_macro::{binnpats, binnvecs}; use binnpatch_macro::{binnpats, binnvecs};
fn main() { fn main() {

View File

@ -190,15 +190,11 @@ pub fn binnpat(_item: TokenStream) -> TokenStream {
let param_group = Group::new(Delimiter::Parenthesis, param_elements); let param_group = Group::new(Delimiter::Parenthesis, param_elements);
let sep_colon = Punct::new(':', Spacing::Joint); let sep_colon = Punct::new(':', Spacing::Joint);
let i_lib = Ident::new("binnpatch", Span::call_site());
let i_struct = Ident::new("BytesPattern", Span::call_site()); let i_struct = Ident::new("BytesPattern", Span::call_site());
let i_from = Ident::new("from", Span::call_site()); let i_from = Ident::new("from", Span::call_site());
let mut result = TokenStream::new(); let mut result = TokenStream::new();
result.extend(forest!( result.extend(forest!(
i_lib,
sep_colon,
sep_colon,
i_struct, i_struct,
sep_colon, sep_colon,
sep_colon, sep_colon,