From 654c6046ed0c4edafdc006acc998ca5aa0cf0a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20P=C5=82askonka?= Date: Wed, 8 May 2024 13:51:41 +0200 Subject: [PATCH] Updated toolchain to allow compilation. (#81) --- .github/workflows/ci-cargo-odra.yml | 3 --- Cargo.toml | 8 ++++---- justfile | 18 ------------------ rust-toolchain | 2 +- src/command.rs | 6 +----- 5 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci-cargo-odra.yml b/.github/workflows/ci-cargo-odra.yml index 63b18de..e838d27 100644 --- a/.github/workflows/ci-cargo-odra.yml +++ b/.github/workflows/ci-cargo-odra.yml @@ -31,6 +31,3 @@ jobs: components: rustfmt, clippy - run: just prepare - run: just check-lint - - run: just install - - run: just test-project-generation-on-stable-odra - - run: just test-project-generation-on-future-odra diff --git a/Cargo.toml b/Cargo.toml index b503d91..0503286 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] authors = [ - "Jakub Płaskonka kuba@odra.dev", - "Krzysztof Pobiarżyn krzysztof@odra.dev", - "Maciej Zieliński maciej@odra.dev", + "Jakub Płaskonka kuba@odra.dev", + "Krzysztof Pobiarżyn krzysztof@odra.dev", + "Maciej Zieliński maciej@odra.dev", ] license = "MIT" repository = "https://github.com/odradev/cargo-odra" @@ -10,7 +10,7 @@ description = "A cargo utility that helps to create, manage and test your smart keywords = ["wasm", "webassembly", "blockchain"] categories = ["wasm", "smart contracts"] name = "cargo-odra" -version = "0.0.9" +version = "0.0.9-fixed" edition = "2021" [dependencies] diff --git a/justfile b/justfile index 51c8128..94b7059 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,3 @@ -DEVELOPMENT_ODRA_BRANCH := "release/0.5.0" - default: just --list @@ -10,22 +8,6 @@ prepare: rustup target add wasm32-unknown-unknown sudo apt install wabt -test-project-generation-on-stable-odra: - rm -rf testproject - cargo odra new --name testproject - just test-testproject - -test-project-generation-on-future-odra: - rm -rf testproject - cargo odra new --name testproject --source {{DEVELOPMENT_ODRA_BRANCH}} - just test-testproject - -test-testproject: - cd testproject && cargo odra generate -c plascoin - cd testproject && cargo odra test - cd testproject && cargo odra test -b casper - cd testproject && cargo odra clean - clippy: cargo clippy --all-targets -- -D warnings diff --git a/rust-toolchain b/rust-toolchain index 101ae3a..4cf320d 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2023-03-01 \ No newline at end of file +nightly-2024-02-09 diff --git a/src/command.rs b/src/command.rs index 083231c..8bb20b7 100644 --- a/src/command.rs +++ b/src/command.rs @@ -180,11 +180,7 @@ pub fn write_to_file(path: PathBuf, content: &str) { /// Appends a content to a file at the given path. pub fn append_file(path: PathBuf, content: &str) { - let mut file = OpenOptions::new() - .write(true) - .append(true) - .open(path) - .unwrap(); + let mut file = OpenOptions::new().append(true).open(path).unwrap(); file.write_all(content.as_bytes()).unwrap(); }