Remove need for allow(unreachable_code)

This commit is contained in:
David Tolnay
2017-12-11 17:55:23 -08:00
parent 9360094ba7
commit 65104aca9c
2 changed files with 28 additions and 7 deletions
+9
View File
@@ -73,3 +73,12 @@ impl ToTokens for Match {
}
}
}
impl AsRef<Tokens> for Fragment {
fn as_ref(&self) -> &Tokens {
match *self {
Fragment::Expr(ref expr) => expr,
Fragment::Block(ref block) => block,
}
}
}