From: Ummon Date: Mon, 1 Dec 2014 14:11:20 +0000 (+0100) Subject: 'unwarp' -> 'into_inner'. X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=ffb9351a121dff754127787c80dff9e0bcd49848;p=crypto_lab1.git 'unwarp' -> 'into_inner'. --- diff --git a/lab1_rust/Cargo.lock b/lab1_rust/Cargo.lock index fd2a459..2efcda0 100644 --- a/lab1_rust/Cargo.lock +++ b/lab1_rust/Cargo.lock @@ -2,41 +2,27 @@ name = "lab1_rust" version = "0.0.2" dependencies = [ - "openssl 0.0.1 (git+https://github.com/sfackler/rust-openssl.git)", -] - -[[package]] -name = "libressl-pnacl-sys" -version = "2.0.1" -source = "git+https://github.com/DiamondLovesYou/libressl-pnacl-sys.git#9a42eeb52070ae0aa4f666d36198899e1e54cda5" -dependencies = [ - "pnacl-build-helper 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.2.1 (git+https://github.com/sfackler/rust-openssl.git)", ] [[package]] name = "openssl" -version = "0.0.1" -source = "git+https://github.com/sfackler/rust-openssl.git#33af6a0b7a1037945181db96cf4f6915457a3df6" +version = "0.2.1" +source = "git+https://github.com/sfackler/rust-openssl.git#c3603b0db00d044c8332d39dd9d49e3c76a2a978" dependencies = [ - "libressl-pnacl-sys 2.0.1 (git+https://github.com/DiamondLovesYou/libressl-pnacl-sys.git)", - "openssl-sys 0.0.1 (git+https://github.com/sfackler/rust-openssl.git)", + "openssl-sys 0.2.1 (git+https://github.com/sfackler/rust-openssl.git)", ] [[package]] name = "openssl-sys" -version = "0.0.1" -source = "git+https://github.com/sfackler/rust-openssl.git#33af6a0b7a1037945181db96cf4f6915457a3df6" +version = "0.2.1" +source = "git+https://github.com/sfackler/rust-openssl.git#c3603b0db00d044c8332d39dd9d49e3c76a2a978" dependencies = [ - "pkg-config 0.0.1 (git+https://github.com/alexcrichton/pkg-config-rs)", + "pkg-config 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pkg-config" -version = "0.0.1" -source = "git+https://github.com/alexcrichton/pkg-config-rs#d24a08d87d63df8dc9526c503944415b86719220" - -[[package]] -name = "pnacl-build-helper" -version = "1.0.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/lab1_rust/Cargo.toml b/lab1_rust/Cargo.toml index 1f50cc1..0103b89 100644 --- a/lab1_rust/Cargo.toml +++ b/lab1_rust/Cargo.toml @@ -12,6 +12,4 @@ name = "lab1_rust" [dependencies.openssl] git = "https://github.com/sfackler/rust-openssl.git" -#git = "https://github.com/vhbit/rust-openssl.git" -#rev = "1f1c30dd3a577b301bb85bf95f964227f84d73fd" diff --git a/lab1_rust/src/end_point.rs b/lab1_rust/src/end_point.rs index e7b0e32..f69f78e 100644 --- a/lab1_rust/src/end_point.rs +++ b/lab1_rust/src/end_point.rs @@ -136,7 +136,7 @@ impl Client { let mut m = MemWriter::new(); match (Packet { t: Command(Packet::random_packet_data(&[42])), timestamp: timestamp }).write(&mut m, packet::Variant::Weak) { Err(_) => vec!(), - _ => m.unwrap() + _ => m.into_inner() } } @@ -221,7 +221,7 @@ impl Client { let mut m = MemWriter::new(); let raw_packet = match (Packet { t: Command(Packet::random_packet_data(&[42])), timestamp: client.end_point.current_timestamp }).write_with_padding_fun(&mut m, packet::Variant::Weak, |_, _| -> u8 { 0 }) { Err(_) => vec!(), - _ => m.unwrap() + _ => m.into_inner() }; match client.end_point.send_raw_with_result(raw_packet.as_slice()) { diff --git a/lab1_rust/src/packet.rs b/lab1_rust/src/packet.rs index f453324..4016ccb 100644 --- a/lab1_rust/src/packet.rs +++ b/lab1_rust/src/packet.rs @@ -273,5 +273,5 @@ fn iv_from_timestamp(timestamp: u64) -> Vec { let mut iv = io::MemWriter::with_capacity(16); let _ = iv.write_be_u64(0u64); let _ = iv.write_be_u64(timestamp); - iv.unwrap() + iv.into_inner() }