format: line wrap and remove unused imports

This commit is contained in:
LinlyBoi
2025-07-10 13:22:19 +03:00
parent 1c89d15bdf
commit 61678f5455
2 changed files with 6 additions and 8 deletions

View File

@@ -11,7 +11,8 @@ mod youtube;
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse(); let args = Args::parse();
let video_files: Vec<String> = args.videos() let video_files: Vec<String> = args
.videos()
.split(',') .split(',')
.map(|s| s.trim().to_string()) .map(|s| s.trim().to_string())
.collect(); .collect();
@@ -29,7 +30,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}; };
let timestamp_file = args.timestamp_file(); let timestamp_file = args.timestamp_file();
let dry_run = args.dry_run(); let dry_run = args.dry_run();
// Load or create metadata // Load or create metadata

View File

@@ -1,3 +1,4 @@
use chrono::{DateTime, Duration, Utc};
use oauth2::basic::BasicClient; use oauth2::basic::BasicClient;
use oauth2::reqwest::async_http_client; use oauth2::reqwest::async_http_client;
use oauth2::{ use oauth2::{
@@ -6,12 +7,11 @@ use oauth2::{
}; };
use rand::seq::SliceRandom; use rand::seq::SliceRandom;
use reqwest::Client; use reqwest::Client;
use serde_json::json;
use std::path::Path;
use chrono::{DateTime, Duration, Utc};
use std::fs::{self, File};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_json::json;
use std::fs::{self, File};
use std::io::{self, BufRead, BufReader}; use std::io::{self, BufRead, BufReader};
use std::path::Path;
use youtube_scheduler::expand_tilde; use youtube_scheduler::expand_tilde;
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
@@ -38,7 +38,6 @@ struct StoredTokens {
expires_at: Option<DateTime<Utc>>, expires_at: Option<DateTime<Utc>>,
} }
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct UploadResponse { pub struct UploadResponse {
pub id: String, pub id: String,
@@ -257,7 +256,6 @@ impl YouTubeUploader {
} }
} }
pub fn create_default_metadata(video_files: &[String]) -> Vec<VideoMetadata> { pub fn create_default_metadata(video_files: &[String]) -> Vec<VideoMetadata> {
video_files video_files
.iter() .iter()