Skip to content

Commit

Permalink
Merge pull request #1 from PeterDing/move-to-awc
Browse files Browse the repository at this point in the history
Move to awc
  • Loading branch information
PeterDing authored Jan 16, 2020
2 parents f586525 + ad70508 commit 77abff1
Show file tree
Hide file tree
Showing 11 changed files with 345 additions and 633 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
/target
**/*.rs.bk

Cargo.lock
15 changes: 8 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ path = "src/main.rs"
[dependencies]
percent-encoding = "2.1"
term_size = "0.3"
ansi_term = "0.11"
bytes = "0.4"
tokio = "0.1"
ansi_term = "0.12"
bytes = "0.5"
failure = "0.1"
futures = "0.1"
actix = "0.7"
actix-web = { version = "0.7", features = ["ssl"] }

futures = "0.3"
futures-util = "0.3"
actix-rt = "1.0"
awc = { version = "1.0", features = ["openssl"] }

[dependencies.clap]
version = "2.32"
version = "2.33"
default-features = false
features = [ "suggestions", "color" ]
4 changes: 3 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
use std::{env, path::Path};

use actix_web::http::Uri;
#[cfg(windows)]
use ansi_term::enable_ansi_support;

use clap::ArgMatches;

use percent_encoding::percent_decode;

use awc::http::Uri;

use crate::{
clap_app::build_app,
common::AGET_EXT,
Expand Down
5 changes: 2 additions & 3 deletions src/chunk.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::sync::{Arc, Mutex};
use std::{cell::RefCell, rc::Rc};

#[derive(Debug, Clone)]
pub struct RangePart {
Expand All @@ -16,8 +16,7 @@ impl RangePart {
}
}

pub type RangeStack = Arc<Mutex<Vec<RangePart>>>;
pub type AtomicRangStack = Arc<Mutex<RangePart>>;
pub type RangeStack = Rc<RefCell<Vec<RangePart>>>;

/// Split a close `interval` to many piece chunk that its size is equal to `chunk_length`,
/// but the last piece size can be less then `chunk_length`.
Expand Down
Loading

0 comments on commit 77abff1

Please sign in to comment.