clippy fix

This commit is contained in:
Emil Ernerfeldt 2021-03-08 22:16:25 +01:00
parent f1c6d2b59c
commit 8f3a25d749

View file

@ -35,7 +35,7 @@ impl Output {
/// This can be used by a text-to-speech system to describe the events (if any). /// This can be used by a text-to-speech system to describe the events (if any).
pub fn events_description(&self) -> String { pub fn events_description(&self) -> String {
// only describe last event: // only describe last event:
for event in self.events.iter().rev() { if let Some(event) = self.events.iter().rev().next() {
match event { match event {
OutputEvent::WidgetEvent(WidgetEvent::Focus, widget_info) => { OutputEvent::WidgetEvent(WidgetEvent::Focus, widget_info) => {
return widget_info.description(); return widget_info.description();