Fixed field renaming for FieldDialogBuilder
(#14)
This commit is contained in:
parent
e28a0bb749
commit
0c864ee8c2
1 changed files with 14 additions and 11 deletions
|
@ -34,7 +34,7 @@ struct DialogFilter<'a> {
|
|||
///
|
||||
/// Constructs file picker dialogs that can select single/multiple files or directories.
|
||||
#[derive(Debug, Default, Clone, Hash, Serialize)]
|
||||
#[serde(rename = "camelCase")]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FileDialogBuilder<'a> {
|
||||
default_path: Option<&'a Path>,
|
||||
filters: Vec<DialogFilter<'a>>,
|
||||
|
@ -120,7 +120,10 @@ impl<'a> FileDialogBuilder<'a> {
|
|||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
pub fn add_filters(&mut self, filters: impl IntoIterator<Item = (&'a str, &'a [&'a str])>) -> &mut Self {
|
||||
pub fn add_filters(
|
||||
&mut self,
|
||||
filters: impl IntoIterator<Item = (&'a str, &'a [&'a str])>,
|
||||
) -> &mut Self {
|
||||
for (name, extensions) in filters.into_iter() {
|
||||
self.filters.push(DialogFilter {
|
||||
name: name.as_ref(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue