From 0a772af3ec677705042630723c55b421f4fe084d Mon Sep 17 00:00:00 2001 From: Ammar Arif Date: Fri, 27 Oct 2023 16:51:23 +0900 Subject: [PATCH] bump rust to `1.73.0` (#1113) --- .github/workflows/ci.yml | 2 +- crates/dojo-lang/src/compiler.rs | 2 +- crates/dojo-test-utils/build.rs | 3 +-- crates/katana/core/src/db/cached.rs | 3 +-- crates/sozo/src/ops/events.rs | 2 +- rust-toolchain.toml | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9018c28d4..6ae009e828 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: env: CARGO_TERM_COLOR: always - RUST_VERSION: 1.70.0 + RUST_VERSION: 1.73.0 jobs: test: diff --git a/crates/dojo-lang/src/compiler.rs b/crates/dojo-lang/src/compiler.rs index 889cc00a22..25532adfbd 100644 --- a/crates/dojo-lang/src/compiler.rs +++ b/crates/dojo-lang/src/compiler.rs @@ -117,7 +117,7 @@ impl Compiler for DojoCompiler { let mut manifest = target_dir .open_ro("manifest.json", "output file", ws.config()) .map(|file| dojo_world::manifest::Manifest::try_from(file.deref()).unwrap_or_default()) - .unwrap_or(dojo_world::manifest::Manifest::default()); + .unwrap_or_default(); update_manifest(&mut manifest, db, &main_crate_ids, compiled_classes)?; diff --git a/crates/dojo-test-utils/build.rs b/crates/dojo-test-utils/build.rs index e26a8409cc..f1b17f19ed 100644 --- a/crates/dojo-test-utils/build.rs +++ b/crates/dojo-test-utils/build.rs @@ -10,8 +10,7 @@ fn main() { use scarb::ops::{self, CompileOpts}; use scarb_ui::Verbosity; - let project_paths = - vec!["../../examples/spawn-and-move", "../torii/graphql/src/tests/types-test"]; + let project_paths = ["../../examples/spawn-and-move", "../torii/graphql/src/tests/types-test"]; project_paths.iter().for_each(|path| compile(path)); diff --git a/crates/katana/core/src/db/cached.rs b/crates/katana/core/src/db/cached.rs index 316d9bf32b..164caa5992 100644 --- a/crates/katana/core/src/db/cached.rs +++ b/crates/katana/core/src/db/cached.rs @@ -276,8 +276,7 @@ pub trait MaybeAsCachedDb { fn maybe_as_cached_db(&self) -> Option; } -/// A wrapper type for [CachedState](blockifier::state::cached_state::CachedState) which -/// also allow storing the Sierra classes. +/// A wrapper type for [CachedState] which also allow storing the Sierra classes. /// /// The inner fields are wrapped in [Arc] and an async [RwLock](tokio::sync::RwLock) as to allow for /// asynchronous access to the state. diff --git a/crates/sozo/src/ops/events.rs b/crates/sozo/src/ops/events.rs index 02aa24e260..2d5996d971 100644 --- a/crates/sozo/src/ops/events.rs +++ b/crates/sozo/src/ops/events.rs @@ -69,7 +69,7 @@ fn parse_event( ) -> Option { let keys = event.keys; let event_hash = keys[0].to_string(); - let Some(events) = events_map.get(&event_hash) else { return None }; + let events = events_map.get(&event_hash)?; 'outer: for e in events { let mut ret = format!("Event name: {}\n", e.name); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 22048ac5bb..8142c30126 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.70.0" +channel = "1.73.0"