Use cfg(test) instead of allow(unused)

This commit is contained in:
Edwin Cheng 2019-05-28 10:55:08 +08:00
parent a3b9aecc9b
commit 464a00814c

View File

@ -18,7 +18,7 @@ pub(crate) struct SubtreeTokenSource<'a> {
impl<'a> SubtreeTokenSource<'a> {
// Helper function used in test
#[allow(unused)]
#[cfg(test)]
pub fn text(&self) -> SmolStr {
match self.get(self.curr.1) {
Some(tt) => tt.text,