Skip to content

Commit

Permalink
Please clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Myers <[email protected]>
  • Loading branch information
Elizafox committed Feb 20, 2024
1 parent fb18ac4 commit f02e6c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions migration/src/m20230702_081718_create_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use sea_orm_migration::prelude::*;
#[derive(DeriveMigrationName)]
pub struct Migration;

#[allow(clippy::enum_variant_names)]
#[derive(Iden)]
enum Url {
Table,
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub(crate) async fn login_page_handler(

let err_str = session
.get::<String>("login_error")
.unwrap_or(String::new());
.unwrap_or_default();

// Remove stale login error
session.remove("login_error");
Expand Down
2 changes: 1 addition & 1 deletion src/validators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub(crate) fn validate_url(url: &str) -> Result<(), ValidationError> {

let url_parsed = Url::parse(url).map_err(|_| ValidationError::new("Invalid URL"))?;
if !url_parsed.has_host() {
return Err(ValidationError::new("No host found"))?;
Err(ValidationError::new("No host found"))?;
}

match url_parsed.scheme() {
Expand Down

0 comments on commit f02e6c8

Please sign in to comment.