Skip to content

Commit

Permalink
Replace rust-crypto with a copy of rustc's SHA-256
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed May 6, 2016
1 parent 04a3be7 commit 7742513
Show file tree
Hide file tree
Showing 14 changed files with 693 additions and 20 deletions.
4 changes: 1 addition & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ rustup-utils = { path = "src/rustup-utils", version = "0.1.9" }
error-chain = { path = "src/error-chain", version = "0.1.9" }
clap = "2.2.4"
regex = "0.1.41"
rust-crypto = "0.2.35"
url = "1.1.0"
term = "0.4.4"
itertools = "0.4.1"
Expand Down
1 change: 0 additions & 1 deletion src/rustup-cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ extern crate regex;
#[macro_use]
extern crate rustup;
extern crate term;
extern crate crypto;
extern crate itertools;
extern crate time;
extern crate rand;
Expand Down
3 changes: 1 addition & 2 deletions src/rustup-cli/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ use rustup::{NotifyHandler};
use errors::*;
use rustup_dist::dist;
use rustup_utils::utils;
use crypto::sha2::Sha256;
use crypto::digest::Digest;
use rustup_utils::sha2::{Sha256, Digest};
use std::env;
use std::env::consts::EXE_SUFFIX;
use std::path::{Path, PathBuf};
Expand Down
1 change: 0 additions & 1 deletion src/rustup-dist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ license = "MIT OR Apache-2.0"

[dependencies]
regex = "0.1.41"
rust-crypto = "0.2.35"
itertools = "0.4.1"
ole32-sys = "0.2.0"
url = "1.1.0"
Expand Down
3 changes: 1 addition & 2 deletions src/rustup-dist/src/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ use std::path::Path;
use std::fmt;

use regex::Regex;
use crypto::sha2::Sha256;
use crypto::digest::Digest;
use rustup_utils::sha2::{Sha256, Digest};
use itertools::Itertools;

pub const DEFAULT_DIST_ROOT: &'static str = "https://static.rust-lang.org/dist";
Expand Down
3 changes: 1 addition & 2 deletions src/rustup-dist/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use notifications::*;
use rustup_utils::utils;
use temp;

use crypto::sha2::Sha256;
use crypto::digest::Digest;
use rustup_utils::sha2::{Sha256, Digest};

use std::path::Path;
use std::process::Command;
Expand Down
1 change: 0 additions & 1 deletion src/rustup-dist/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![recursion_limit = "1024"]

extern crate regex;
extern crate crypto;
extern crate itertools;
extern crate tempdir;
extern crate walkdir;
Expand Down
3 changes: 1 addition & 2 deletions src/rustup-dist/src/manifestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ use errors::*;
use notifications::*;
use rustup_utils::utils;
use prefix::InstallPrefix;
use crypto::sha2::Sha256;
use crypto::digest::Digest;
use rustup_utils::sha2::{Sha256, Digest};
use itertools::Itertools;
use std::path::Path;

Expand Down
2 changes: 1 addition & 1 deletion src/rustup-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ repository = "https://github.com/rust-lang-nursery/rustup.rs"
license = "MIT OR Apache-2.0"

[dependencies]
rust-crypto = "0.2.35"
rand = "0.3.11"
scopeguard = "0.1.2"
error-chain = { path = "../error-chain", version = "0.1.9" }
libc = "0.2.0"
native-tls = { git = "https://github.com/sfackler/rust-native-tls.git" }
rustc-serialize = "0.3.19"

[target."cfg(windows)".dependencies]
winapi = "0.2.4"
Expand Down
4 changes: 3 additions & 1 deletion src/rustup-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#![feature(core_intrinsics)] // For type_name().
#![feature(fundamental)]
#![feature(step_by)]
#![recursion_limit = "1024"] // for error_chain!

extern crate hyper;
extern crate crypto;
extern crate rand;
extern crate scopeguard;
#[macro_use]
extern crate error_chain;
extern crate native_tls;
extern crate rustc_serialize;

#[cfg(windows)]
extern crate winapi;
Expand All @@ -34,6 +35,7 @@ pub mod notifications;
pub mod raw;
pub mod tty;
pub mod utils;
pub mod sha2;

pub use errors::*;
pub use notifications::{Notification, NotifyHandler};
3 changes: 1 addition & 2 deletions src/rustup-utils/src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ use std::fmt;
use std::thread;
use std::time::Duration;
use hyper::{self, Client};
use crypto::sha2::Sha256;
use crypto::digest::Digest;
use sha2::{Sha256, Digest};
use errors::*;

use rand::random;
Expand Down
Loading

0 comments on commit 7742513

Please sign in to comment.