From 32ebc3fc50897d7622d575d7c0f3c15cc3be46f1 Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Sun, 12 Sep 2021 11:27:22 -0500 Subject: [PATCH] Clippy lints --- src/main.rs | 2 +- templates/confirm_delete.rs.html | 2 +- templates/images.rs.html | 2 +- templates/index.rs.html | 4 ++-- templates/layout.rs.html | 4 ++-- templates/not_found.rs.html | 2 +- templates/thumbnails.rs.html | 2 +- templates/view.rs.html | 5 ++--- 8 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3396d21..a00e809 100644 --- a/src/main.rs +++ b/src/main.rs @@ -139,7 +139,7 @@ impl Config { } } -static CONFIG: Lazy = Lazy::new(|| Config::from_args()); +static CONFIG: Lazy = Lazy::new(Config::from_args); #[derive(serde::Deserialize)] enum FileType { diff --git a/templates/confirm_delete.rs.html b/templates/confirm_delete.rs.html index efd60a7..6d79dac 100644 --- a/templates/confirm_delete.rs.html +++ b/templates/confirm_delete.rs.html @@ -5,7 +5,7 @@ @:layout_html("Confirm Delete", Some(&format!("Delete {} from pict-rs", image.filename())), { Confirm Delete - + }, {
diff --git a/templates/images.rs.html b/templates/images.rs.html index f8f8791..4fc1066 100644 --- a/templates/images.rs.html +++ b/templates/images.rs.html @@ -4,7 +4,7 @@ @(images: Images) @:layout_html(images.message(), None, { - + }, {
@if let Some(images) = images.files() { diff --git a/templates/index.rs.html b/templates/index.rs.html index 12c856e..cd70e2a 100644 --- a/templates/index.rs.html +++ b/templates/index.rs.html @@ -3,8 +3,8 @@ @(endpoint: &str, name: &str) @:layout_html("Upload Images", None, { - - + + }, {
diff --git a/templates/layout.rs.html b/templates/layout.rs.html index 6d5aa0f..85a9df9 100644 --- a/templates/layout.rs.html +++ b/templates/layout.rs.html @@ -9,7 +9,7 @@ @title - + @if let Some(description) = description { @@ -17,7 +17,7 @@ } - + @:head() diff --git a/templates/not_found.rs.html b/templates/not_found.rs.html index 0e90919..64b22d9 100644 --- a/templates/not_found.rs.html +++ b/templates/not_found.rs.html @@ -3,7 +3,7 @@ @() @:layout_html("Not Found", None, { - + }, {
diff --git a/templates/thumbnails.rs.html b/templates/thumbnails.rs.html index 960ac7a..72211e7 100644 --- a/templates/thumbnails.rs.html +++ b/templates/thumbnails.rs.html @@ -7,7 +7,7 @@ - + }, {
diff --git a/templates/view.rs.html b/templates/view.rs.html index 4e74a40..a5e43f5 100644 --- a/templates/view.rs.html +++ b/templates/view.rs.html @@ -4,7 +4,7 @@ @(image: Image, size: Option) @:layout_html(&format!("Image: {}", image.filename()), Some("An image hosted on pict-rs"), { - + @if let Some(size) = size { @@ -36,11 +36,10 @@ loop > -

Direct Link

} else { @image.filename() -

Direct Link

} +

Direct Link

}