Skip to content

Commit

Permalink
Remove unused types in command_attr
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Jun 1, 2024
1 parent e80c6ae commit 3425df9
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions command_attr/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@ use syn::parse::{Error, Parse, ParseStream, Result as SynResult};
use syn::punctuated::Punctuated;
use syn::spanned::Spanned;
use syn::token::{Comma, Mut};
use syn::{
braced,
bracketed,
parenthesized,
parse_quote,
Attribute,
Ident,
Lifetime,
Lit,
Path,
PathSegment,
Type,
};
use syn::{parenthesized, parse_quote, Attribute, Ident, Lifetime, Lit, Path, PathSegment, Type};

use crate::structures::CommandFun;

Expand Down Expand Up @@ -91,30 +79,6 @@ macro_rules! propagate_err {
}};
}

#[derive(Debug)]
pub struct Bracketed<T>(pub Punctuated<T, Comma>);

impl<T: Parse> Parse for Bracketed<T> {
fn parse(input: ParseStream<'_>) -> SynResult<Self> {
let content;
bracketed!(content in input);

Ok(Bracketed(content.parse_terminated(T::parse)?))
}
}

#[derive(Debug)]
pub struct Braced<T>(pub Punctuated<T, Comma>);

impl<T: Parse> Parse for Braced<T> {
fn parse(input: ParseStream<'_>) -> SynResult<Self> {
let content;
braced!(content in input);

Ok(Braced(content.parse_terminated(T::parse)?))
}
}

#[derive(Debug)]
pub struct Parenthesised<T>(pub Punctuated<T, Comma>);

Expand Down

0 comments on commit 3425df9

Please sign in to comment.