Clippy code cleanup
This commit is contained in:
+6
-8
@@ -49,10 +49,8 @@ impl NavigatedPage<WordMessage> for WordState {
|
||||
SetValue(n) => {
|
||||
self.word.value = n;
|
||||
}
|
||||
SetAdditional(key, value) => match key.as_str() {
|
||||
_ => {
|
||||
self.word.additional.insert(key, value.clone());
|
||||
}
|
||||
SetAdditional(key, value) => {
|
||||
self.word.additional.insert(key, value.clone());
|
||||
},
|
||||
AddAdditional(key) => {
|
||||
self.word.additional.insert(key, "".to_string());
|
||||
@@ -145,20 +143,20 @@ impl WordState {
|
||||
}
|
||||
}
|
||||
|
||||
fn reading_field(&self, value: &String) -> Element<'_, WordMessage> {
|
||||
fn reading_field(&self, value: &str) -> Element<'_, WordMessage> {
|
||||
self.additional_field(value, "Чтение слова".to_string(), "reading".to_string())
|
||||
}
|
||||
|
||||
fn description_field(&self, value: &String) -> Element<'_, WordMessage> {
|
||||
fn description_field(&self, value: &str) -> Element<'_, WordMessage> {
|
||||
self.additional_field(value, "Описание".to_string(), "description".to_string())
|
||||
}
|
||||
|
||||
fn context_field(&self, value: &String) -> Element<'_, WordMessage> {
|
||||
fn context_field(&self, value: &str) -> Element<'_, WordMessage> {
|
||||
self.additional_field(value, "В контексте".to_string(), "context".to_string())
|
||||
}
|
||||
fn additional_field(
|
||||
&self,
|
||||
value: &String,
|
||||
value: &str,
|
||||
name: String,
|
||||
id: String,
|
||||
) -> Element<'_, WordMessage> {
|
||||
|
||||
Reference in New Issue
Block a user