Use deref coercion to simplify some argument passing

This commit is contained in:
Marcin Puc authored and Martin Nordholts committed 2021-09-12 15:50:10 +02:00
1 parent 7956485e37
commit 4baa346aae
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ impl InputDescription {
}
pub fn title(&self) -> &String {
match self.title.as_ref() {
match &self.title {
Some(title) => title,
None => &self.name,
}