Skip to content

Commit

Permalink
Upgrade rust 1.69.0 (#906)
Browse files Browse the repository at this point in the history
* Upgrade rust-1.69

* fix clippy
  • Loading branch information
zjb0807 authored Apr 26, 2023
1 parent 19afb58 commit 8c036ba
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2022-10-30
toolchain: nightly-2023-03-04
components: rustfmt
target: wasm32-unknown-unknown
- name: Generate code coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2022-10-30
toolchain: nightly-2023-03-04
- name: Install cargo-unleash
run: cargo install cargo-unleash --git https://github.com/xlc/cargo-unleash.git # https://github.com/paritytech/cargo-unleash/pull/38
- name: Prepare
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2022-10-30
toolchain: nightly-2023-03-04
components: rustfmt
target: wasm32-unknown-unknown
- name: Install Wasm toolchain
Expand Down
2 changes: 1 addition & 1 deletion bencher/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn handle(output: Vec<u8>, storage_infos: Vec<StorageInfo>) {
let name = String::from_utf8_lossy(&result.method).to_string();

let y: Vec<f64> = result.elapses.into_iter().map(|x| x as f64).collect();
let x: Vec<f64> = (0..y.len()).into_iter().map(|x| x as f64).collect();
let x: Vec<f64> = (0..y.len()).map(|x| x as f64).collect();
let data = vec![("Y", y), ("X", x)];
let data = RegressionDataBuilder::new().build_from(data).unwrap();
let formula = "Y ~ X";
Expand Down
9 changes: 2 additions & 7 deletions bencher/src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,15 @@ use sp_state_machine::StorageKey;
use sp_storage::ChildInfo;
use std::{collections::HashMap, sync::Arc, time::Instant};

#[derive(PartialEq, Eq)]
#[derive(PartialEq, Eq, Default)]
enum AccessType {
#[default]
None,
Redundant,
Important,
Whitelisted,
}

impl Default for AccessType {
fn default() -> Self {
AccessType::None
}
}

impl AccessType {
fn is_important(&self) -> bool {
*self == AccessType::Important
Expand Down

0 comments on commit 8c036ba

Please sign in to comment.