Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
KitaitiMakoto committed Apr 12, 2020
1 parent 9770a0e commit 44504e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plume-models/src/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub enum Role {
}

#[derive(Queryable, Identifiable, Clone, Debug, AsChangeset)]
#[changeset_options(treat_none_as_null="true")]
#[changeset_options(treat_none_as_null = "true")]
pub struct User {
pub id: i32,
pub username: String,
Expand Down
5 changes: 4 additions & 1 deletion src/routes/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ pub fn update(
)
.0,
);
user.preferred_theme = form.theme.clone().and_then(|t| if &t == "" { None } else { Some(t) });
user.preferred_theme = form
.theme
.clone()
.and_then(|t| if &t == "" { None } else { Some(t) });
user.hide_custom_css = form.hide_custom_css;
let _: User = user.save_changes(&*conn).map_err(Error::from)?;

Expand Down

0 comments on commit 44504e4

Please sign in to comment.