make clippy happy

This commit is contained in:
lumi 2017-05-22 18:45:43 +02:00
commit dbcbe7cd9b
2 changed files with 21 additions and 20 deletions

View file

@ -45,9 +45,8 @@ impl<'a, T: IntoElements + Clone> IntoElements for &'a [T] {
impl<T: IntoElements> IntoElements for Option<T> {
fn into_elements(self, emitter: &mut ElementEmitter) {
match self {
Some(e) => e.into_elements(emitter),
None => (),
if let Some(e) = self {
e.into_elements(emitter);
}
}
}