Skip to content

Commit

Permalink
Merge pull request #51 from palfrey/update-for-newer-warnings
Browse files Browse the repository at this point in the history
Update for latest rust/actions
  • Loading branch information
palfrey authored Mar 29, 2024
2 parents 4730eb9 + 2480ee3 commit 1e743c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- beta
- nightly
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ fn run_binop_shortcut(
shortcut_return: bool,
f: fn(&State, &Expression, &Expression) -> Result<bool>,
) -> Result<bool> {
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
Expand Down Expand Up @@ -143,8 +143,8 @@ fn run_mathbinop(
op: &Expression,
f: fn(f64, f64) -> f64,
) -> Result<Expression> {
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;
Expand Down

0 comments on commit 1e743c6

Please sign in to comment.