fix: resolve all 40 clippy warnings (dead_code, unused_imports, lints)
Some checks failed
ci/woodpecker/pr/check Pipeline was successful
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
Some checks failed
ci/woodpecker/pr/check Pipeline was successful
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
- Add #[allow(unused_imports)] on pub re-exports used only by lib/tests - Add #[allow(dead_code)] on public API items unused in binary target - Fix collapsible_if, redundant_closure, unnecessary_map_or in main.rs - Prefix unused test variables with underscore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,7 @@ pub struct PhotoInfo {
|
||||
}
|
||||
|
||||
/// Состояние загрузки фотографии
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum PhotoDownloadState {
|
||||
NotDownloaded,
|
||||
@@ -80,6 +81,7 @@ pub enum PhotoDownloadState {
|
||||
}
|
||||
|
||||
/// Информация о голосовом сообщении
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct VoiceInfo {
|
||||
pub file_id: i32,
|
||||
@@ -91,6 +93,7 @@ pub struct VoiceInfo {
|
||||
}
|
||||
|
||||
/// Состояние загрузки голосового сообщения
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum VoiceDownloadState {
|
||||
NotDownloaded,
|
||||
@@ -283,6 +286,7 @@ impl MessageInfo {
|
||||
}
|
||||
|
||||
/// Возвращает мутабельную ссылку на VoiceInfo (если есть)
|
||||
#[allow(dead_code)]
|
||||
pub fn voice_info_mut(&mut self) -> Option<&mut VoiceInfo> {
|
||||
match &mut self.content.media {
|
||||
Some(MediaInfo::Voice(info)) => Some(info),
|
||||
@@ -693,6 +697,7 @@ pub struct ImageModalState {
|
||||
}
|
||||
|
||||
/// Состояние воспроизведения голосового сообщения
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct PlaybackState {
|
||||
/// ID сообщения, которое воспроизводится
|
||||
@@ -708,6 +713,7 @@ pub struct PlaybackState {
|
||||
}
|
||||
|
||||
/// Статус воспроизведения
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum PlaybackStatus {
|
||||
Playing,
|
||||
|
||||
Reference in New Issue
Block a user