Formating with fmt
This commit is contained in:
1 parent
de2dbaf6c1
commit
bf805b79e5
13 files changed
+44
-42
No files matched your search
+8
-4
@@ -1,15 +1,15 @@
|
||||
use crate::data_provider::import::{get_words_of_group, load_groups, ImportData, ImportGroup};
|
||||
use crate::AppState;
|
||||
use crate::data_provider::import::{ImportData, ImportGroup, get_words_of_group, load_groups};
|
||||
use crate::data_provider::words::{add_group, add_words};
|
||||
use crate::dictionary::app_data_dir;
|
||||
use crate::import::ImportMessage::*;
|
||||
use crate::lang::{WordData, WordGroup};
|
||||
use crate::navigation::{NavigatedPage, Page, RootMessage};
|
||||
use crate::styling::*;
|
||||
use crate::AppState;
|
||||
use iced::widget::button::danger;
|
||||
use iced::widget::container::success;
|
||||
use iced::widget::{
|
||||
button, checkbox, column, container, progress_bar, row, rule, text, text_input, Row,
|
||||
Row, button, checkbox, column, container, progress_bar, row, rule, text, text_input,
|
||||
};
|
||||
use iced::widget::{scrollable, space};
|
||||
use iced::{Element, Task};
|
||||
@@ -512,7 +512,11 @@ impl ImportState {
|
||||
.map(|name| (name.clone(), Vec::<usize>::with_capacity(1)))
|
||||
.collect::<Vec<_>>();
|
||||
for (key, endpoint) in &group.mapping {
|
||||
let property_index = group.fields.iter().position(|f| f == key).expect("Unknown property");
|
||||
let property_index = group
|
||||
.fields
|
||||
.iter()
|
||||
.position(|f| f == key)
|
||||
.expect("Unknown property");
|
||||
let group_index = result
|
||||
.iter()
|
||||
.position(|(name, _)| name == endpoint)
|
||||
|
||||
Reference in new issue
Block a user