Skip to content

Commit

Permalink
chore: cargo fix result
Browse files Browse the repository at this point in the history
  • Loading branch information
QingXia-Ela committed Jul 30, 2024
1 parent 035e456 commit 6ed5edc
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 23 deletions.
4 changes: 1 addition & 3 deletions src-tauri/src/client_env/node_env.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use std::ffi::c_void;

use libloading::{Library, Symbol};
use libloading::Library;

use crate::client_path::PLUGIN_PATH;

Expand Down
6 changes: 2 additions & 4 deletions src-tauri/src/plugin_manager/mod.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
mod plugin_instance;
mod plugin_utils;

use libloading::Library;
use plugin_utils::*;
use std::{
collections::HashMap,
io::{self, Write},
io::{self},
};

use crate::{
global_struct::music_injector::{MusicInjector, MusicInjectorMetadata},
logger,
plugin_error::{PluginError, PluginRequestError},
plugin_error::{PluginError},
};

extern crate libloading;
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/proxy/api_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use crate::vanilla_injector::{custom_playlist_injector, local_music_injector, te
use futures::executor::block_on;
use indexmap::IndexMap;
use std::sync::Arc;
use std::{collections::HashSet, thread::JoinHandle};
use std::{fmt::Debug, net::SocketAddrV4, thread};
use tauri::{App, Manager};
use std::{thread::JoinHandle};
use std::{net::SocketAddrV4, thread};
use tauri::{Manager};
use warp::Filter;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/proxy/cdn_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl CdnProxy {
port: u16,
api_port: u16,
filter_rules: FilterType,
mut cdn_cache: Option<HashMap<String, Vec<u8>>>,
cdn_cache: Option<HashMap<String, Vec<u8>>>,
) -> Self {
let proxy = warp::path::full()
.and(warp::header::headers_cloned())
Expand Down
3 changes: 1 addition & 2 deletions src-tauri/src/proxy/handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ use reqwest::{
header::{HeaderMap, *},
Client,
};
use std::{borrow::BorrowMut, collections::HashMap, sync::Arc};
use std::{borrow::BorrowMut, sync::Arc};
use warp::{
filters::path::FullPath,
reject::Rejection,
reply::{Reply, Response},
};

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/server/download_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod download_error;

use std::{collections::HashMap, sync::Arc};
// use std::hash::
use reqwest::{Client, Response};
use reqwest::{Client};
use serde::{Deserialize, Serialize};
use tokio::time::Instant;

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/server/file_server.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod handle_request;
pub mod utils;
use futures::{executor::block_on, lock::Mutex};
use futures::{lock::Mutex};
use handle_request::handle_request;
use reqwest::StatusCode;
use std::{
Expand Down
6 changes: 2 additions & 4 deletions src-tauri/src/tauri_commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use std::sync::{Arc, Mutex};
use std::sync::{Arc};

use indexmap::IndexMap;
use tauri::{generate_handler, Manager};
use tauri::{Manager};

use crate::{
global_struct::music_injector::{MusicInjector, MusicInjectorMetadata},
logger::debug,
plugin_manager::PluginManager,
};

// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
Expand Down
4 changes: 1 addition & 3 deletions src-tauri/src/vanilla_injector/siren_injector.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::fmt::format;

use crate::{
constants::SIREN_WEBSITE,
Expand All @@ -19,8 +18,7 @@ use reqwest::{
Client,
};
use serde::{Deserialize, Serialize};
use tauri::App;
use warp::{reject::Rejection, reply::Response};
use warp::{reply::Response};
type FilterType = Vec<[&'static str; 2]>;

const ALBUMS_URL: &str = "https://monster-siren.hypergryph.com/api/albums";
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/vanilla_injector/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rodio::{source::Source, Decoder};
use std::io::BufReader;
use std::{fs::File, time::Duration};
use std::{fs::File};

/// 获取音频时长,返回毫秒
pub async fn get_audio_duration_from_path(path: &str) -> Option<u64> {
Expand Down

0 comments on commit 6ed5edc

Please sign in to comment.