From 63bf602df7a7a6e584c1479c1496e12a96fabcd0 Mon Sep 17 00:00:00 2001 From: Ummon Date: Sat, 13 Dec 2014 13:09:56 +0100 Subject: [PATCH] Update to the nighlty build of Rust. --- lab1_rust/Cargo.lock | 30 ++++++++++++++++++++++-------- lab1_rust/src/packet.rs | 3 ++- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/lab1_rust/Cargo.lock b/lab1_rust/Cargo.lock index 7f3c078..d5a58e5 100644 --- a/lab1_rust/Cargo.lock +++ b/lab1_rust/Cargo.lock @@ -2,27 +2,41 @@ name = "lab1_rust" version = "0.0.2" dependencies = [ - "openssl 0.2.2 (git+https://github.com/sfackler/rust-openssl.git)", + "openssl 0.2.3 (git+https://github.com/sfackler/rust-openssl.git)", +] + +[[package]] +name = "libressl-pnacl-sys" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pnacl-build-helper 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl" -version = "0.2.2" -source = "git+https://github.com/sfackler/rust-openssl.git#6cdd2cf577434ca3473c217e8a272ee965ef131f" +version = "0.2.3" +source = "git+https://github.com/sfackler/rust-openssl.git#9754b8e47db5faff2930ed070527d2d71e76e094" dependencies = [ - "openssl-sys 0.2.2 (git+https://github.com/sfackler/rust-openssl.git)", + "openssl-sys 0.2.3 (git+https://github.com/sfackler/rust-openssl.git)", ] [[package]] name = "openssl-sys" -version = "0.2.2" -source = "git+https://github.com/sfackler/rust-openssl.git#6cdd2cf577434ca3473c217e8a272ee965ef131f" +version = "0.2.3" +source = "git+https://github.com/sfackler/rust-openssl.git#9754b8e47db5faff2930ed070527d2d71e76e094" dependencies = [ - "pkg-config 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libressl-pnacl-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pkg-config" -version = "0.1.0" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pnacl-build-helper" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/lab1_rust/src/packet.rs b/lab1_rust/src/packet.rs index 7e9c38c..ff6aa71 100644 --- a/lab1_rust/src/packet.rs +++ b/lab1_rust/src/packet.rs @@ -6,6 +6,7 @@ use serialize::hex::{ ToHex }; use self::PacketType::{ Command, Answer, Error }; use crypto; +#[deriving(Show, Copy)] pub enum Variant { Weak, // The MAC is computed on data without padding. Fixed // The MAC is computed on data and padding. @@ -102,7 +103,7 @@ impl fmt::Show for PacketType { match self { &Command(ref data) => write!(formatter, "Command {{ {} }}", data_to_str(data)), &Answer(ref data) => write!(formatter, "Answer {{ {} }}", data_to_str(data)), - &Error(error_type) => write!(formatter, "Error {{ errorType: {} }}", error_type) + &Error(ref error_type) => write!(formatter, "Error {{ errorType: {} }}", error_type) } } } -- 2.45.2