mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Apply suggestions from code review
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
This commit is contained in:
parent
27ef3409c2
commit
c7f38981a4
1 changed files with 9 additions and 5 deletions
|
@ -92,7 +92,7 @@ macro_rules! match_prefix {
|
|||
("") => {{
|
||||
|data: &str| Some(data.to_owned())
|
||||
}};
|
||||
($prefix: literal) => {{
|
||||
($prefix:literal) => {{
|
||||
|data: &str| {
|
||||
if data.starts_with($prefix) {
|
||||
Some(data.to_owned())
|
||||
|
@ -105,10 +105,14 @@ macro_rules! match_prefix {
|
|||
|
||||
macro_rules! impl_api_error {
|
||||
(
|
||||
$(#[$meta: meta])*
|
||||
$vis: vis enum $ident: ident {
|
||||
$($(#[$var_meta: meta])*
|
||||
$var_name: ident$(($var_inner: ty))? = $var_string: literal $(with $var_parser: block)?),* } ) => {
|
||||
$( #[$meta:meta] )*
|
||||
$vis:vis enum $ident:ident {
|
||||
$(
|
||||
$( #[$var_meta:meta] )*
|
||||
$var_name:ident $( ($var_inner:ty) )? = $var_string:literal $(with $var_parser: block)?
|
||||
),*
|
||||
}
|
||||
) => {
|
||||
|
||||
$(#[$meta])*
|
||||
#[derive(Error)]
|
||||
|
|
Loading…
Reference in a new issue