refactor: I ran clippy --fix

This commit is contained in:
LinlyBoi
2025-07-10 17:03:00 +03:00
parent 0000e5826f
commit 9f6712beb5
2 changed files with 3 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
use chrono::{DateTime, Utc};
use clap::Parser;
use tokio;
use youtube::{create_default_metadata, load_oauth_config, load_video_metadata, YouTubeUploader};
use youtube_scheduler::*;

View File

@@ -257,11 +257,10 @@ impl YouTubeUploader {
}
pub fn create_default_metadata(video_files: &[String], description_file: &str) -> Vec<VideoMetadata> {
let expanded_path = expand_tilde(&description_file);
let expanded_path = expand_tilde(description_file);
video_files
.iter()
.enumerate()
.map(|(_i, file_path)| {
.map(|file_path| {
let filename = Path::new(file_path)
.file_stem()
.unwrap_or_default()
@@ -269,7 +268,7 @@ pub fn create_default_metadata(video_files: &[String], description_file: &str) -
.to_string();
VideoMetadata {
title: format!("{}", filename),
title: filename.to_string(),
description: get_random_line(&expanded_path).unwrap_or_default(),
tags: vec!["gaming".to_string()],
category_id: "20".to_string(), // GAMING