mirror of
https://github.com/lanyeeee/bilibili-video-downloader.git
synced 2026-09-07 00:27:46 +08:00
chore: 解决一些编译警告
This commit is contained in:
@@ -171,7 +171,7 @@ impl<W: Write> AssWriter<W> {
|
||||
}
|
||||
}
|
||||
|
||||
fn escape_text(text: &str) -> Cow<str> {
|
||||
fn escape_text(text: &str) -> Cow<'_, str> {
|
||||
let text = text.trim();
|
||||
if memchr::memchr(b'\n', text.as_bytes()).is_some() {
|
||||
Cow::from(text.replace('\n', "\\N"))
|
||||
|
||||
@@ -31,19 +31,19 @@ impl AnyhowErrorToStringChain for anyhow::Error {
|
||||
}
|
||||
|
||||
pub trait AppHandleExt {
|
||||
fn get_config(&self) -> State<RwLock<Config>>;
|
||||
fn get_bili_client(&self) -> State<BiliClient>;
|
||||
fn get_download_manager(&self) -> State<DownloadManager>;
|
||||
fn get_config(&self) -> State<'_, RwLock<Config>>;
|
||||
fn get_bili_client(&self) -> State<'_, BiliClient>;
|
||||
fn get_download_manager(&self) -> State<'_, DownloadManager>;
|
||||
}
|
||||
|
||||
impl AppHandleExt for tauri::AppHandle {
|
||||
fn get_config(&self) -> State<RwLock<Config>> {
|
||||
impl AppHandleExt for AppHandle {
|
||||
fn get_config(&self) -> State<'_, RwLock<Config>> {
|
||||
self.state::<RwLock<Config>>()
|
||||
}
|
||||
fn get_bili_client(&self) -> State<BiliClient> {
|
||||
fn get_bili_client(&self) -> State<'_, BiliClient> {
|
||||
self.state::<BiliClient>()
|
||||
}
|
||||
fn get_download_manager(&self) -> State<DownloadManager> {
|
||||
fn get_download_manager(&self) -> State<'_, DownloadManager> {
|
||||
self.state::<DownloadManager>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ mod logger;
|
||||
mod types;
|
||||
mod utils;
|
||||
mod wbi;
|
||||
#[allow(dead_code)]
|
||||
mod protobuf {
|
||||
include!("./bilibili.community.service.dm.v1.rs");
|
||||
}
|
||||
|
||||
@@ -136,10 +136,6 @@ pub struct LabelInUserInfo {
|
||||
pub img_label_uri_hant_static: String,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize, Type)]
|
||||
#[serde(default)]
|
||||
pub struct IconResource {}
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize, Type)]
|
||||
#[serde(default)]
|
||||
pub struct Wallet {
|
||||
|
||||
Reference in New Issue
Block a user