Skip to content

Commit f02e6c8

Browse files
committed
Please clippy
Signed-off-by: Elizabeth Myers <[email protected]>
1 parent fb18ac4 commit f02e6c8

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

migration/src/m20230702_081718_create_table.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use sea_orm_migration::prelude::*;
1717
#[derive(DeriveMigrationName)]
1818
pub struct Migration;
1919

20+
#[allow(clippy::enum_variant_names)]
2021
#[derive(Iden)]
2122
enum Url {
2223
Table,

src/controllers/admin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub(crate) async fn login_page_handler(
8888

8989
let err_str = session
9090
.get::<String>("login_error")
91-
.unwrap_or(String::new());
91+
.unwrap_or_default();
9292

9393
// Remove stale login error
9494
session.remove("login_error");

src/validators.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub(crate) fn validate_url(url: &str) -> Result<(), ValidationError> {
2222

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

2828
match url_parsed.scheme() {

0 commit comments

Comments
 (0)