From baa650e5b9a3541ae45a5f6aa2b5bb185bb58458 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Fri, 29 Mar 2024 15:06:01 +0000 Subject: [PATCH 1/2] Fix some derefs we don't need anymore --- src/runner.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runner.rs b/src/runner.rs index 1961ad9..53d9fda 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -68,11 +68,11 @@ fn run_binop_shortcut( shortcut_return: bool, f: fn(&State, &Expression, &Expression) -> Result, ) -> Result { - let res_first = run_expression(state, program, first.deref())?; + let res_first = run_expression(state, program, first)?; if shortcut.is_some() && shortcut.unwrap() == res_first { return Ok(shortcut_return); } - let res_second = run_expression(state, program, second.deref())?; + let res_second = run_expression(state, program, second)?; debug!("first: {:?} second: {:?}", res_first, res_second); // Check for same types comparison first @@ -143,8 +143,8 @@ fn run_mathbinop( op: &Expression, f: fn(f64, f64) -> f64, ) -> Result { - let res_first = run_expression(state, program, first.deref())?; - let res_second = run_expression(state, program, second.deref())?; + let res_first = run_expression(state, program, first)?; + let res_second = run_expression(state, program, second)?; match res_first { Expression::Floating(ref i) => { let first_value = *i; From 2480ee3dcef7ef102656c894f747ad8eb072295f Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Fri, 29 Mar 2024 15:12:33 +0000 Subject: [PATCH 2/2] Upgrade checkout --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 114150c..e723cf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - beta - nightly steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - uses: dtolnay/rust-toolchain@master @@ -40,7 +40,7 @@ jobs: name: minimal versions check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - uses: dtolnay/rust-toolchain@master @@ -55,7 +55,7 @@ jobs: name: web build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - uses: dtolnay/rust-toolchain@master @@ -75,13 +75,12 @@ jobs: needs: [web, test, minimal-versions] if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - uses: dtolnay/rust-toolchain@master with: toolchain: stable - override: true target: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 - name: Install trunk