Skip to content

Commit 0866004

Browse files
committed
chore(labrinth): more unrelated Clippy fixes
1 parent 17498f0 commit 0866004

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

apps/labrinth/src/models/v3/billing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ impl ChargeType {
189189
pub fn as_str(&self) -> &'static str {
190190
match self {
191191
ChargeType::OneTime => "one-time",
192-
ChargeType::Subscription { .. } => "subscription",
193-
ChargeType::Proration { .. } => "proration",
192+
ChargeType::Subscription => "subscription",
193+
ChargeType::Proration => "proration",
194194
ChargeType::Refund => "refund",
195195
}
196196
}

apps/labrinth/src/routes/v2/version_creation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub async fn version_create(
188188
// Handle project type via file extension prediction
189189
let mut project_type = None;
190190
for file_part in &legacy_create.file_parts {
191-
if let Some(ext) = file_part.split('.').last() {
191+
if let Some(ext) = file_part.split('.').next_back() {
192192
match ext {
193193
"mrpack" | "mrpack-primary" => {
194194
project_type = Some("modpack");

apps/labrinth/src/routes/v3/version_file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ pub async fn get_update_from_hash(
191191
})
192192
.sorted();
193193

194-
if let Some(first) = versions.last() {
194+
if let Some(first) = versions.next_back() {
195195
if !is_visible_version(
196196
&first.inner,
197197
&user_option,
@@ -523,7 +523,7 @@ pub async fn update_individual_files(
523523
bool
524524
})
525525
.sorted()
526-
.last();
526+
.next_back();
527527

528528
if let Some(version) = version {
529529
if is_visible_version(

0 commit comments

Comments
 (0)