Skip to content

Commit

Permalink
Fix all third party libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu Ding committed Jan 24, 2018
1 parent bb0c3fc commit 01eb675
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 161 deletions.
22 changes: 0 additions & 22 deletions third_party/cfg-if/.travis.yml

This file was deleted.

5 changes: 1 addition & 4 deletions third_party/cfg-if/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ description = """
A macro to ergonomically define an item depending on a large number of #[cfg]
parameters. Structured like an if-else chain, the first matching branch is the
item that gets emitted.
"""

[badges]
travis-ci = { repository = "alexcrichton/cfg-if" }
"""
16 changes: 4 additions & 12 deletions third_party/cfg-if/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,9 @@ fn main() {

# License

This project is licensed under either of
`cfg-if` is primarily distributed under the terms of both the MIT license and
the Apache License (Version 2.0), with portions covered by various BSD-like
licenses.

* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT)
See LICENSE-APACHE, and LICENSE-MIT for details.

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
2 changes: 1 addition & 1 deletion third_party/log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ appveyor = { repository = "alexcrichton/log" }
sgx_tstd = { path = "../../sgx_tstd" }

[dependencies]
cfg-if = { path = "../cfg-if" }
cfg-if = { version = "0.1.2", path = "../cfg-if" }
serde = { version = "1.0", optional = true, default-features = false, path = "../serde-rs/serde/serde" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion third_party/matrixmultiply/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ harness = false
sgx_tstd = { path = "../../sgx_tstd" }

[dependencies]
rawpointer = { path = "../rawpointer" }
rawpointer = { version = "0.1", path = "../rawpointer" }

[dev-dependencies]
bencher = "0.1.2"
Expand Down
31 changes: 0 additions & 31 deletions third_party/num/derive/x86_64-unknown-linux-sgx.json

This file was deleted.

2 changes: 1 addition & 1 deletion third_party/ring/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ sgx_tstd = { path = "../../sgx_tstd" }
sgx_rand = { path = "../../sgx_rand" }

[dependencies]
untrusted = { path = "../untrusted" }
untrusted = { version = "0.6", path = "../untrusted" }

[target.'cfg(any(target_os = "redox", all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies]
lazy_static = { path = "../lazy-static.rs" }
Expand Down
Empty file modified third_party/rust-csv/ci/check-copy
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion third_party/rust-csv/csv-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ foo,\"bar,baz\"

#![deny(missing_docs)]
#![no_std]

#![cfg_attr(target_env = "sgx", feature(rustc_private))]

#[cfg(test)]
extern crate arrayvec;
extern crate sgx_trts;
Expand Down
6 changes: 6 additions & 0 deletions third_party/rust-csv/csv-index/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ amenable to serializing to disk.)
*/

#![deny(missing_docs)]
#![cfg_attr(not(target_env = "sgx"), no_std)]
#![cfg_attr(target_env = "sgx", feature(rustc_private))]

#[cfg(not(target_env = "sgx"))]
#[macro_use(format)]
extern crate sgx_tstd as std;

extern crate byteorder;
extern crate csv;
Expand Down
Empty file modified third_party/rust-csv/scripts/copy-examples
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion third_party/rustls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["network-programming", "cryptography"]
sgx_tstd = { path = "../../sgx_tstd" }

[dependencies]
untrusted = { path = "../untrusted" }
untrusted = { version = "0.6", path = "../untrusted" }
base64 = { path = "../rust-base64" }
log = { path = "../log" , optional = true }
ring = { path = "../ring" , version="0.12.1", features = ["rsa_signing"] }
Expand Down
2 changes: 1 addition & 1 deletion third_party/sct/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ sgx_tstd = { path = "../../sgx_tstd" }

[dependencies]
ring = { version = "0.12", path = "../ring" }
untrusted = { path = "../untrusted" }
untrusted = { version = "0.6", path = "../untrusted" }
40 changes: 0 additions & 40 deletions third_party/test_all.sh

This file was deleted.

8 changes: 0 additions & 8 deletions third_party/untrusted/.gitattributes

This file was deleted.

15 changes: 0 additions & 15 deletions third_party/untrusted/.travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions third_party/untrusted/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
authors = ["Brian Smith <[email protected]>"]
description = "Safe, fast, zero-panic, zero-crashing, zero-allocation parsing of untrusted inputs in Rust."
documentation = "https://briansmith.org/rustdoc/untrusted/"
license = "ISC"
license-file = "LICENSE.txt"
name = "untrusted"
readme = "README.md"
repository = "https://github.com/briansmith/untrusted"
version = "0.6.1"
version = "0.6.0"

[lib]
name = "untrusted"
path = "src/untrusted.rs"

[profile.bench]
opt-level = 3
Expand Down
27 changes: 8 additions & 19 deletions third_party/untrusted/src/untrusted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl<'a> Input<'a> {
/// Returns an iterator over the input.
#[inline]
pub fn iter(&self) -> <&[u8] as IntoIterator>::IntoIter {
self.value.iter()
self.value.into_iter()
}

/// Returns the length of the `Input`.
Expand Down Expand Up @@ -207,11 +207,11 @@ impl <'a, 'b> PartialEq<&'b [u8]> for Input<'a> {
/// Calls `read` with the given input as a `Reader`, ensuring that `read`
/// consumed the entire input. When `input` is `None`, `read` will be
/// called with `None`.
pub fn read_all_optional<F, R, E>(input: Option<Input>,
incomplete_read: E, read: F)
-> Result<R, E>
where F: FnOnce(Option<&mut Reader>)
-> Result<R, E> {
pub fn read_all_optional<'a, F, R, E>(input: Option<Input<'a>>,
incomplete_read: E, read: F)
-> Result<R, E>
where F: FnOnce(Option<&mut Reader>)
-> Result<R, E> {
match input {
Some(input) => {
let mut input = Reader::new(input);
Expand Down Expand Up @@ -283,7 +283,7 @@ impl<'a> Reader<'a> {
/// byte is equal to `b`, and false otherwise.
pub fn peek(&self, b: u8) -> bool {
match self.input.get(self.i) {
Some(actual_b) => b == *actual_b,
Some(actual_b) => return b == *actual_b,
None => false
}
}
Expand Down Expand Up @@ -367,7 +367,7 @@ mod no_panic {
}

#[inline]
pub fn iter(&self) -> <&'a [u8] as IntoIterator>::IntoIter {
pub fn into_iter(&self) -> <&'a [u8] as IntoIterator>::IntoIter {
self.bytes.into_iter()
}

Expand Down Expand Up @@ -436,15 +436,4 @@ mod tests {
let input = Input::from(slice);
assert_eq!(input.as_slice_less_safe(), slice);
}

#[test]
fn test_input_as_iterator() {
let slice = b"foo";
let input = Input::from(slice);
let mut iter = input.iter();
assert_eq!(Some(&b'f'), iter.next());
assert_eq!(Some(&b'o'), iter.next());
assert_eq!(Some(&b'o'), iter.next());
assert_eq!(None, iter.next());
}
}
2 changes: 1 addition & 1 deletion third_party/webpki/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sgx_tstd = { path = "../../sgx_tstd" }

[dependencies]
ring = { path = "../ring" }
untrusted = { path = "../untrusted" }
untrusted = { version = "0.6", path = "../untrusted" }

[dev-dependencies]
base64 = { path = "../rust-base64" }
Expand Down

0 comments on commit 01eb675

Please sign in to comment.