Skip to content

Commit

Permalink
Appease clippy 1.83
Browse files Browse the repository at this point in the history
  • Loading branch information
matze committed Dec 3, 2024
1 parent 9d7df4f commit f0a2625
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "wastebin"
version = "2.5.0"
edition = "2021"
rust-version = "1.80"
rust-version = "1.83"

[dependencies]
askama = { version = "0.12", default-features = false, features = ["with-axum"] }
Expand Down
12 changes: 6 additions & 6 deletions src/pages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub struct Index<'a> {
max_expiration: Option<NonZeroU32>,
}

impl<'a> Index<'a> {
impl Index<'_> {
pub fn new(max_expiration: Option<NonZeroU32>) -> Self {
Self {
meta: &env::METADATA,
Expand Down Expand Up @@ -90,7 +90,7 @@ const EXPIRATION_OPTIONS: [(&str, Expiration); 8] = [
("🔥 after reading", Expiration::Burn),
];

impl<'a> Index<'a> {
impl Index<'_> {
fn expiry_options(&self) -> &str {
static EXPIRATION_OPTIONS_HTML: OnceLock<String> = OnceLock::new();

Expand Down Expand Up @@ -136,7 +136,7 @@ pub struct Paste<'a> {
html: String,
}

impl<'a> Paste<'a> {
impl Paste<'_> {
/// Construct new paste view from cache `key` and paste `html`.
pub fn new(key: CacheKey, html: Html, can_delete: bool) -> Self {
let html = html.into_inner();
Expand All @@ -163,7 +163,7 @@ pub struct Encrypted<'a> {
query: String,
}

impl<'a> Encrypted<'a> {
impl Encrypted<'_> {
/// Construct new paste view from cache `key` and paste `html`.
pub fn new(key: CacheKey, query: QueryData) -> Self {
let query = match (query.fmt, query.dl) {
Expand Down Expand Up @@ -204,7 +204,7 @@ pub struct Qr<'a> {
code: qrcodegen::QrCode,
}

impl<'a> Qr<'a> {
impl Qr<'_> {
/// Construct new QR code view from `code`.
pub fn new(code: qrcodegen::QrCode, key: CacheKey) -> Self {
Self {
Expand Down Expand Up @@ -232,7 +232,7 @@ pub struct Burn<'a> {
code: qrcodegen::QrCode,
}

impl<'a> Burn<'a> {
impl Burn<'_> {
/// Construct new burn page linking to `id`.
pub fn new(code: qrcodegen::QrCode, id: String) -> Self {
Self {
Expand Down

0 comments on commit f0a2625

Please sign in to comment.