From 95f3c9074392b7782d28e6a94e79dfc303066ea2 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Tue, 15 Jul 2014 22:41:46 -0700 Subject: [PATCH] Switch Travis to using cargo --- .travis.yml | 11 +++++------ phf/src/lib.rs | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35784efa..80b55055 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,11 @@ env: - secure: ffCiAwT3mkRQ57yTyTKUV4nRsnsdDuTSXbwSFpNg/AXLn6KTt35wpp2kbKTUhU4fUikpoKh30+TMiXp1vhc7XSUo/E06JyjccRIE6oXas07NcYhYd0JRlPPWKZU8q33jvFYFB7U63vY/65tGk+wlrWm7NFyqqXwGMuysd7XT1tE= - LD_LIBRARY_PATH: /usr/local/lib install: - - curl -O http://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz - - tar xfz rust-nightly-x86_64-unknown-linux-gnu.tar.gz - - (cd rust-nightly-x86_64-unknown-linux-gnu/ && sudo ./install.sh) -before_script: - - ./configure + - curl http://www.rust-lang.org/rustup.sh | sudo sh - script: - - make all check doc + - cd phf && cargo test + - cd phf && rustdoc -L target/test -L target/test/deps --test src/lib.rs + - rustdoc -L phf/target/test -L phf/target/test/deps phf/src/lib.rs + - rustdoc phf_mac/src/lib.rs after_script: - curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh diff --git a/phf/src/lib.rs b/phf/src/lib.rs index f093256b..aeaa2f32 100644 --- a/phf/src/lib.rs +++ b/phf/src/lib.rs @@ -110,7 +110,7 @@ impl PhfMap { /// Like `find`, but can operate on any type that is equivalent to a key. pub fn find_equiv<'a, T: Hash+Equiv>(&'a self, key: &T) - -> Option<&'a V> { + -> Option<&'a V> { self.get_entry(key, |k| key.equiv(k)).map(|e| { let &(_, ref v) = e; v @@ -120,7 +120,7 @@ impl PhfMap { /// Like `find_key`, but can operate on any type that is equivalent to a /// key. pub fn find_key_equiv<'a, T: Hash+Equiv>(&'a self, key: &T) - -> Option<&'a K> { + -> Option<&'a K> { self.get_entry(key, |k| key.equiv(k)).map(|e| { let &(ref k, _) = e; k