mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 08:41:21 +10:00
Allowing some dead code features because they are there for future use (potentially)
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -31,11 +31,13 @@ where
|
|||||||
capacity: capacity.into(),
|
capacity: capacity.into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn run_contexts_sequentially(&self, contexts: Vec<T>) {
|
pub fn run_contexts_sequentially(&self, contexts: Vec<T>) {
|
||||||
for context in contexts {
|
for context in contexts {
|
||||||
(self.f)(context, self.callback.clone(), self.counter.clone());
|
(self.f)(context, self.callback.clone(), self.counter.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn run_contexts_parallel_background(&self, contexts: Vec<T>, max_threads: usize) {
|
pub fn run_contexts_parallel_background(&self, contexts: Vec<T>, max_threads: usize) {
|
||||||
let threads = ThreadPoolBuilder::new()
|
let threads = ThreadPoolBuilder::new()
|
||||||
// If max_threads == 0, then the limit will be determined
|
// If max_threads == 0, then the limit will be determined
|
||||||
|
|||||||
@ -95,6 +95,7 @@ pub fn run() {
|
|||||||
let mut builder = tauri::Builder::default().plugin(tauri_plugin_dialog::init());
|
let mut builder = tauri::Builder::default().plugin(tauri_plugin_dialog::init());
|
||||||
|
|
||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
|
#[allow(unused_variables)]
|
||||||
{
|
{
|
||||||
builder = builder.plugin(tauri_plugin_single_instance::init(|_app, argv, _cwd| {
|
builder = builder.plugin(tauri_plugin_single_instance::init(|_app, argv, _cwd| {
|
||||||
// when defining deep link schemes at runtime, you must also check `argv` here
|
// when defining deep link schemes at runtime, you must also check `argv` here
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
use atomic_counter::RelaxedCounter;
|
use atomic_counter::RelaxedCounter;
|
||||||
|
|
||||||
use crate::downloads::progress::ProgressChecker;
|
use crate::downloads::progress::ProgressChecker;
|
||||||
use std::sync::atomic::{AtomicBool, AtomicUsize};
|
use std::sync::atomic::AtomicBool;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -20,6 +20,6 @@ fn test_progress_parallel() {
|
|||||||
p.run_contexts_parallel_background((1..100).collect(), 10);
|
p.run_contexts_parallel_background((1..100).collect(), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test_fn(int: usize, callback: Arc<AtomicBool>, counter: Arc<RelaxedCounter>) {
|
fn test_fn(int: usize, _callback: Arc<AtomicBool>, _counter: Arc<RelaxedCounter>) {
|
||||||
println!("{}", int);
|
println!("{}", int);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user