- let local_user_form = LocalUserForm {
- person_id: Some(person_id),
- email,
- password_encrypted: Some(password_encrypted),
- show_nsfw: data.show_nsfw,
- show_bot_accounts: data.show_bot_accounts,
- show_scores: data.show_scores,
- theme: data.theme.to_owned(),
- default_sort_type,
- default_listing_type,
- interface_language: data.interface_language.to_owned(),
- show_avatars: data.show_avatars,
- show_read_posts: data.show_read_posts,
- show_new_post_notifs: data.show_new_post_notifs,
- send_notifications_to_email: data.send_notifications_to_email,
- email_verified: None,
- accepted_application: None,
- };
+ let local_user_form = LocalUserUpdateForm::builder()
+ .email(email)
+ .show_avatars(data.show_avatars)
+ .show_read_posts(data.show_read_posts)
+ .show_new_post_notifs(data.show_new_post_notifs)
+ .send_notifications_to_email(data.send_notifications_to_email)
+ .show_nsfw(data.show_nsfw)
+ .show_bot_accounts(data.show_bot_accounts)
+ .show_scores(data.show_scores)
+ .default_sort_type(default_sort_type)
+ .default_listing_type(default_listing_type)
+ .theme(data.theme.to_owned())
+ .interface_language(data.interface_language.to_owned())
+ .build();