Skip to content

Commit dc9cf16

Browse files
committed
Remove FilterAttrs trait when unused
1 parent 7dcfac7 commit dc9cf16

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/attr.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use super::*;
22
use proc_macro2::TokenStream;
3+
#[cfg(feature = "printing")]
34
use std::iter;
5+
#[cfg(feature = "printing")]
46
use std::slice;
57

68
#[cfg(feature = "parsing")]
@@ -582,13 +584,16 @@ impl MetaList {
582584
}
583585
}
584586

587+
#[cfg(feature = "printing")]
585588
pub(crate) trait FilterAttrs<'a> {
586589
type Ret: Iterator<Item = &'a Attribute>;
587590

588591
fn outer(self) -> Self::Ret;
592+
#[cfg(feature = "full")]
589593
fn inner(self) -> Self::Ret;
590594
}
591595

596+
#[cfg(feature = "printing")]
592597
impl<'a> FilterAttrs<'a> for &'a [Attribute] {
593598
type Ret = iter::Filter<slice::Iter<'a, Attribute>, fn(&&Attribute) -> bool>;
594599

@@ -602,6 +607,7 @@ impl<'a> FilterAttrs<'a> for &'a [Attribute] {
602607
self.iter().filter(is_outer)
603608
}
604609

610+
#[cfg(feature = "full")]
605611
fn inner(self) -> Self::Ret {
606612
fn is_inner(attr: &&Attribute) -> bool {
607613
match attr.style {

0 commit comments

Comments
 (0)