Upgrade deps
This commit is contained in:
parent
15ae48e5af
commit
ae847ce99c
12 changed files with 493 additions and 2173 deletions
801
Cargo.lock
generated
801
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -13,13 +13,13 @@ serde_json = "1"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
bencode = {path = "../bencode", default-features=false}
|
bencode = {path = "../bencode", default-features=false}
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
parking_lot = "0.11"
|
parking_lot = "0.12"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
pretty_env_logger = "0.4"
|
pretty_env_logger = "0.4"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
indexmap = "1.7"
|
indexmap = "1.7"
|
||||||
directories = "3"
|
directories = "4"
|
||||||
|
|
||||||
clone_to_owned = {path="../clone_to_owned"}
|
clone_to_owned = {path="../clone_to_owned"}
|
||||||
librqbit_core = {path="../librqbit_core"}
|
librqbit_core = {path="../librqbit_core"}
|
||||||
|
|
|
||||||
|
|
@ -33,20 +33,20 @@ anyhow = "1"
|
||||||
|
|
||||||
regex = "1"
|
regex = "1"
|
||||||
reqwest = {version="0.11", default-features=false}
|
reqwest = {version="0.11", default-features=false}
|
||||||
urlencoding = "1"
|
urlencoding = "2"
|
||||||
byteorder = "1"
|
byteorder = "1"
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
bitvec = "0.22"
|
bitvec = "1"
|
||||||
parking_lot = "0.11"
|
parking_lot = "0.12"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
size_format = "1"
|
size_format = "1"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
|
|
||||||
openssl = {version="0.10", optional=true}
|
openssl = {version="0.10", optional=true}
|
||||||
crypto-hash = {version="0.3", optional=true}
|
crypto-hash = {version="0.3", optional=true}
|
||||||
sha1 = {version = "0.6", optional=true}
|
sha1 = {version = "0.10", optional=true}
|
||||||
|
|
||||||
uuid = {version = "0.8", features = ["v4"]}
|
uuid = {version = "1.2", features = ["v4"]}
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
url = "2"
|
url = "2"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ fn compute_chunk_status(lengths: &Lengths, needed_pieces: &BF) -> BF {
|
||||||
chunk_bf
|
chunk_bf
|
||||||
.get_mut(offset..offset + chunks_per_piece)
|
.get_mut(offset..offset + chunks_per_piece)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.set_all(true);
|
.fill(true);
|
||||||
}
|
}
|
||||||
chunk_bf
|
chunk_bf
|
||||||
}
|
}
|
||||||
|
|
@ -120,7 +120,7 @@ impl ChunkTracker {
|
||||||
self.chunk_status
|
self.chunk_status
|
||||||
.get_mut(self.lengths.chunk_range(index))
|
.get_mut(self.lengths.chunk_range(index))
|
||||||
.map(|s| {
|
.map(|s| {
|
||||||
s.set_all(false);
|
s.fill(false);
|
||||||
true
|
true
|
||||||
})
|
})
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
|
|
||||||
pub type BF = bitvec::vec::BitVec<bitvec::order::Msb0, u8>;
|
pub type BF = bitvec::vec::BitVec<u8, bitvec::order::Msb0>;
|
||||||
|
|
||||||
pub type PeerHandle = SocketAddr;
|
pub type PeerHandle = SocketAddr;
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ edition = "2018"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
url = "2"
|
url = "2"
|
||||||
uuid = {version = "0.8", features = ["v4"]}
|
uuid = {version = "1", features = ["v4"]}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
parking_lot = "0.11"
|
parking_lot = "0.12"
|
||||||
serde = {version = "1", features=["derive"]}
|
serde = {version = "1", features=["derive"]}
|
||||||
buffers = {path="../buffers"}
|
buffers = {path="../buffers"}
|
||||||
bencode = {path = "../bencode", default-features=false}
|
bencode = {path = "../bencode", default-features=false}
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ buffers = {path="../buffers"}
|
||||||
bencode = {path = "../bencode", default-features=false}
|
bencode = {path = "../bencode", default-features=false}
|
||||||
clone_to_owned = {path="../clone_to_owned"}
|
clone_to_owned = {path="../clone_to_owned"}
|
||||||
librqbit_core = {path="../librqbit_core"}
|
librqbit_core = {path="../librqbit_core"}
|
||||||
bitvec = "0.22"
|
bitvec = "1"
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
|
|
@ -182,8 +182,8 @@ pub enum Message<ByteBuf: std::hash::Hash + Eq> {
|
||||||
pub type MessageBorrowed<'a> = Message<ByteBuf<'a>>;
|
pub type MessageBorrowed<'a> = Message<ByteBuf<'a>>;
|
||||||
pub type MessageOwned = Message<ByteString>;
|
pub type MessageOwned = Message<ByteString>;
|
||||||
|
|
||||||
pub type BitfieldBorrowed<'a> = &'a bitvec::slice::BitSlice<bitvec::order::Lsb0, u8>;
|
pub type BitfieldBorrowed<'a> = &'a bitvec::slice::BitSlice<u8, bitvec::order::Lsb0>;
|
||||||
pub type BitfieldOwned = bitvec::vec::BitVec<bitvec::order::Lsb0, u8>;
|
pub type BitfieldOwned = bitvec::vec::BitVec<u8, bitvec::order::Lsb0>;
|
||||||
|
|
||||||
pub struct Bitfield<'a> {
|
pub struct Bitfield<'a> {
|
||||||
pub data: BitfieldBorrowed<'a>,
|
pub data: BitfieldBorrowed<'a>,
|
||||||
|
|
@ -219,7 +219,7 @@ where
|
||||||
impl<'a> Bitfield<'a> {
|
impl<'a> Bitfield<'a> {
|
||||||
pub fn new_from_slice(buf: &'a [u8]) -> anyhow::Result<Self> {
|
pub fn new_from_slice(buf: &'a [u8]) -> anyhow::Result<Self> {
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
data: bitvec::slice::BitSlice::from_slice(buf)?,
|
data: bitvec::slice::BitSlice::from_slice(buf),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1823
crates/rqbit/Cargo.lock
generated
1823
crates/rqbit/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -18,7 +18,7 @@ librqbit = {path="../librqbit", default-features=false}
|
||||||
dht = {path="../dht"}
|
dht = {path="../dht"}
|
||||||
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
|
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
clap = "3.0.0-beta.5"
|
clap = {version = "4", features = ["derive"]}
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
pretty_env_logger = "0.4"
|
pretty_env_logger = "0.4"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::{net::SocketAddr, path::PathBuf, str::FromStr, sync::Arc, time::Duration};
|
use std::{net::SocketAddr, path::PathBuf, str::FromStr, sync::Arc, time::Duration};
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use clap::{ArgEnum, Parser};
|
use clap::{Parser, ValueEnum};
|
||||||
use librqbit::{
|
use librqbit::{
|
||||||
http_api::{ApiAddTorrentResponse, HttpApi},
|
http_api::{ApiAddTorrentResponse, HttpApi},
|
||||||
http_api_client,
|
http_api_client,
|
||||||
|
|
@ -15,7 +15,7 @@ use librqbit::{
|
||||||
use log::{error, info, warn};
|
use log::{error, info, warn};
|
||||||
use size_format::SizeFormatterBinary as SF;
|
use size_format::SizeFormatterBinary as SF;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, ArgEnum)]
|
#[derive(Debug, Clone, Copy, ValueEnum)]
|
||||||
enum LogLevel {
|
enum LogLevel {
|
||||||
Trace,
|
Trace,
|
||||||
Debug,
|
Debug,
|
||||||
|
|
@ -38,7 +38,7 @@ impl FromStr for ParsedDuration {
|
||||||
#[clap(version, author, about)]
|
#[clap(version, author, about)]
|
||||||
struct Opts {
|
struct Opts {
|
||||||
/// The loglevel
|
/// The loglevel
|
||||||
#[clap(arg_enum, short = 'v')]
|
#[clap(value_enum, short = 'v')]
|
||||||
log_level: Option<LogLevel>,
|
log_level: Option<LogLevel>,
|
||||||
|
|
||||||
/// The interval to poll trackers, e.g. 30s.
|
/// The interval to poll trackers, e.g. 30s.
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@ sha1-rust = ["sha1"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
openssl = {version="0.10", optional=true}
|
openssl = {version="0.10", optional=true}
|
||||||
crypto-hash = {version="0.3", optional=true}
|
crypto-hash = {version="0.3", optional=true}
|
||||||
sha1 = {version = "0.6", optional=true}
|
sha1 = {version = "0.10", optional=true}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue