mirror of
https://github.com/OMGeeky/twba.uploader.git
synced 2025-12-26 16:37:23 +01:00
clippy fix
This commit is contained in:
@@ -248,7 +248,7 @@ async fn get_part_files(folder_path: &Path, count: i32) -> Result<Vec<(PathBuf,
|
||||
parts.push((path, part_number));
|
||||
}
|
||||
if parts.len() != count as usize {
|
||||
return Err(UploaderError::PartCountMismatch(count as usize, parts.len()).into());
|
||||
return Err(UploaderError::PartCountMismatch(count as usize, parts.len()));
|
||||
}
|
||||
parts.sort_by_key(|a| a.1);
|
||||
Ok(parts)
|
||||
@@ -275,7 +275,7 @@ fn get_part_number_from_path(path: &Path) -> Result<usize> {
|
||||
warn!("path has not the expected extension (.mp4): {:?}", path);
|
||||
}
|
||||
}
|
||||
Err(UploaderError::WrongFileExtension.into())
|
||||
Err(UploaderError::WrongFileExtension)
|
||||
}
|
||||
|
||||
impl UploaderClient {
|
||||
|
||||
@@ -56,7 +56,7 @@ impl YoutubeClient {
|
||||
let video = Video {
|
||||
snippet: Some(VideoSnippet {
|
||||
title: Some(video_data.video_title),
|
||||
description: Some(video_data.video_description.into()),
|
||||
description: Some(video_data.video_description),
|
||||
category_id: Some(video_data.video_category.to_string()),
|
||||
tags: Some(video_data.video_tags),
|
||||
..Default::default()
|
||||
|
||||
@@ -85,7 +85,7 @@ pub(crate) fn create_youtube_title(
|
||||
Location::Playlist => Some(YOUTUBE_TITLE_MAX_LENGTH),
|
||||
Location::Other => None,
|
||||
};
|
||||
let title = shorten_string_if_needed(&title, max_len);
|
||||
let title = shorten_string_if_needed(title, max_len);
|
||||
Ok(title)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user