summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-06-23 09:08:16 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-06-23 09:08:16 +0200
commit432e4ee649b41c957e9695d3e6961e35ca72ca39 (patch)
treef42a04db53e4276e94122d527935b64d14c0853e /server
parent0d3cd5b288f6923c66f6ca32779c50038fdfb908 (diff)
clippy: Use is_empty
Diffstat (limited to 'server')
-rw-r--r--server/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index d15d64c..dab0cb2 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -1213,7 +1213,7 @@ async fn translation_review_new(
projectid: &str,
data: Json<api_model::TranslationReviewData<'_>>,
) -> Result<Json<api_model::TranslationReview>, Custom<String>> {
- let title = if data.title == "" {
+ let title = if data.title.is_empty() {
"Unnamed"
} else {
data.title.as_str()
@@ -1224,7 +1224,7 @@ async fn translation_review_new(
{
let mut tx = conn.begin().await.unwrap();
- if base == "" {
+ if base.is_empty() {
let main_branch =
sqlx::query!("SELECT main_branch FROM projects WHERE id=?", projectid)
.fetch_one(&mut *tx)