Avoid unnecessary lambda

This commit is contained in:
Gilad Woloch 2021-10-06 12:26:46 +03:00 committed by Arijit Basu
parent 7142c97c7f
commit 45ad449eb3

View File

@ -28,7 +28,7 @@ impl Action {
if self.messages.is_empty() {
None
} else if read_only {
if self.messages.iter().all(|m| m.is_read_only()) {
if self.messages.iter().all(ExternalMsg::is_read_only) {
Some(self)
} else {
None