Upgrade deps

This commit is contained in:
Igor Katson 2022-12-04 13:11:40 +00:00
parent 15ae48e5af
commit ae847ce99c
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
12 changed files with 493 additions and 2173 deletions

801
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,13 +13,13 @@ serde_json = "1"
hex = "0.4"
bencode = {path = "../bencode", default-features=false}
anyhow = "1"
parking_lot = "0.11"
parking_lot = "0.12"
log = "0.4"
pretty_env_logger = "0.4"
futures = "0.3"
rand = "0.8"
indexmap = "1.7"
directories = "3"
directories = "4"
clone_to_owned = {path="../clone_to_owned"}
librqbit_core = {path="../librqbit_core"}

View file

@ -33,20 +33,20 @@ anyhow = "1"
regex = "1"
reqwest = {version="0.11", default-features=false}
urlencoding = "1"
urlencoding = "2"
byteorder = "1"
bincode = "1"
bitvec = "0.22"
parking_lot = "0.11"
bitvec = "1"
parking_lot = "0.12"
log = "0.4"
size_format = "1"
rand = "0.8"
openssl = {version="0.10", 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"
url = "2"
hex = "0.4"

View file

@ -44,7 +44,7 @@ fn compute_chunk_status(lengths: &Lengths, needed_pieces: &BF) -> BF {
chunk_bf
.get_mut(offset..offset + chunks_per_piece)
.unwrap()
.set_all(true);
.fill(true);
}
chunk_bf
}
@ -120,7 +120,7 @@ impl ChunkTracker {
self.chunk_status
.get_mut(self.lengths.chunk_range(index))
.map(|s| {
s.set_all(false);
s.fill(false);
true
})
.unwrap_or_default()

View file

@ -1,5 +1,5 @@
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;

View file

@ -9,9 +9,9 @@ edition = "2018"
hex = "0.4"
anyhow = "1"
url = "2"
uuid = {version = "0.8", features = ["v4"]}
uuid = {version = "1", features = ["v4"]}
log = "0.4"
parking_lot = "0.11"
parking_lot = "0.12"
serde = {version = "1", features=["derive"]}
buffers = {path="../buffers"}
bencode = {path = "../bencode", default-features=false}

View file

@ -13,5 +13,5 @@ buffers = {path="../buffers"}
bencode = {path = "../bencode", default-features=false}
clone_to_owned = {path="../clone_to_owned"}
librqbit_core = {path="../librqbit_core"}
bitvec = "0.22"
bitvec = "1"
anyhow = "1"

View file

@ -182,8 +182,8 @@ pub enum Message<ByteBuf: std::hash::Hash + Eq> {
pub type MessageBorrowed<'a> = Message<ByteBuf<'a>>;
pub type MessageOwned = Message<ByteString>;
pub type BitfieldBorrowed<'a> = &'a bitvec::slice::BitSlice<bitvec::order::Lsb0, u8>;
pub type BitfieldOwned = bitvec::vec::BitVec<bitvec::order::Lsb0, u8>;
pub type BitfieldBorrowed<'a> = &'a bitvec::slice::BitSlice<u8, bitvec::order::Lsb0>;
pub type BitfieldOwned = bitvec::vec::BitVec<u8, bitvec::order::Lsb0>;
pub struct Bitfield<'a> {
pub data: BitfieldBorrowed<'a>,
@ -219,7 +219,7 @@ where
impl<'a> Bitfield<'a> {
pub fn new_from_slice(buf: &'a [u8]) -> anyhow::Result<Self> {
Ok(Self {
data: bitvec::slice::BitSlice::from_slice(buf)?,
data: bitvec::slice::BitSlice::from_slice(buf),
})
}
}

1823
crates/rqbit/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@ librqbit = {path="../librqbit", default-features=false}
dht = {path="../dht"}
tokio = {version = "1", features = ["macros", "rt-multi-thread"]}
anyhow = "1"
clap = "3.0.0-beta.5"
clap = {version = "4", features = ["derive"]}
log = "0.4"
pretty_env_logger = "0.4"
regex = "1"

View file

@ -1,7 +1,7 @@
use std::{net::SocketAddr, path::PathBuf, str::FromStr, sync::Arc, time::Duration};
use anyhow::Context;
use clap::{ArgEnum, Parser};
use clap::{Parser, ValueEnum};
use librqbit::{
http_api::{ApiAddTorrentResponse, HttpApi},
http_api_client,
@ -15,7 +15,7 @@ use librqbit::{
use log::{error, info, warn};
use size_format::SizeFormatterBinary as SF;
#[derive(Debug, Clone, Copy, ArgEnum)]
#[derive(Debug, Clone, Copy, ValueEnum)]
enum LogLevel {
Trace,
Debug,
@ -38,7 +38,7 @@ impl FromStr for ParsedDuration {
#[clap(version, author, about)]
struct Opts {
/// The loglevel
#[clap(arg_enum, short = 'v')]
#[clap(value_enum, short = 'v')]
log_level: Option<LogLevel>,
/// The interval to poll trackers, e.g. 30s.

View file

@ -16,4 +16,4 @@ sha1-rust = ["sha1"]
[dependencies]
openssl = {version="0.10", optional=true}
crypto-hash = {version="0.3", optional=true}
sha1 = {version = "0.6", optional=true}
sha1 = {version = "0.10", optional=true}