diff --git a/.travis.yml b/.travis.yml index 2d48dc81b..9dd93da5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,17 @@ matrix: - os: linux rust: nightly - os: osx - osx_image: xcode11 + osx_image: xcode11.2 + addons: + chrome: stable + firefox: latest + install: + - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | sh + - source ~/.nvm/nvm.sh + - nvm install --lts + - npm install -g chromedriver + - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + - which chromedriver rust: stable allow_failures: - rust: nightly @@ -40,6 +50,5 @@ script: - cd parity-util-mem/ && cargo test --no-default-features --features=dlmalloc-global && cd .. - cd rlp/ && cargo test --no-default-features && cargo check --benches && cd .. - cd triehash/ && cargo check --benches && cd .. - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - cd kvdb-web/ && wasm-pack test --headless --chrome --firefox && cd ..; - fi + - cd kvdb-web/ && wasm-pack test --headless --chrome --firefox && cd .. + diff --git a/ethbloom/src/lib.rs b/ethbloom/src/lib.rs index d21f62022..9ef11e3ee 100644 --- a/ethbloom/src/lib.rs +++ b/ethbloom/src/lib.rs @@ -93,7 +93,7 @@ impl<'a> From> for Hash<'a> { keccak256.update(raw); keccak256.finalize(&mut out); Hash::Owned(out) - }, + } Input::Hash(hash) => Hash::Ref(hash), } } diff --git a/kvdb-rocksdb/src/lib.rs b/kvdb-rocksdb/src/lib.rs index 3cdf19e75..75d2eb615 100644 --- a/kvdb-rocksdb/src/lib.rs +++ b/kvdb-rocksdb/src/lib.rs @@ -112,11 +112,7 @@ impl CompactionProfile { let hdd_check_file = db_path .to_str() .and_then(|path_str| Command::new("df").arg(path_str).output().ok()) - .and_then(|df_res| if df_res.status.success() { - Some(df_res.stdout) - } else { - None - }) + .and_then(|df_res| if df_res.status.success() { Some(df_res.stdout) } else { None }) .and_then(rotational_from_df_output); // Read out the file and match compaction profile. if let Some(hdd_check) = hdd_check_file { @@ -151,10 +147,7 @@ impl CompactionProfile { /// Slow HDD compaction profile pub fn hdd() -> CompactionProfile { - CompactionProfile { - initial_file_size: 256 * MB as u64, - block_size: 64 * KB, - } + CompactionProfile { initial_file_size: 256 * MB as u64, block_size: 64 * KB } } } diff --git a/rlp/src/rlpin.rs b/rlp/src/rlpin.rs index 5dd3730b6..f1c488626 100644 --- a/rlp/src/rlpin.rs +++ b/rlp/src/rlpin.rs @@ -201,10 +201,9 @@ impl<'a> Rlp<'a> { /// raw data slice. /// /// Returns an error if this Rlp is not a list or if the index is out of range. - pub fn at_with_offset<'view>(&'view self, index: usize) - -> Result<(Rlp<'a>, usize), DecoderError> - where - 'a: 'view, + pub fn at_with_offset<'view>(&'view self, index: usize) -> Result<(Rlp<'a>, usize), DecoderError> + where + 'a: 'view, { if !self.is_list() { return Err(DecoderError::RlpExpectedToBeList);