Skip to content

Commit

Permalink
makefile simpler, fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
oflatt committed May 22, 2024
1 parent 7fa612c commit a34c300
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ DIRS = . dag_in_context
all: nits test

test:
$(foreach dir,$(DIRS),(cd $(dir) && cargo insta test --release --unreferenced=reject) &&) :
cargo insta test --release --unreferenced=reject
cd dag_in_context && cargo insta test --release --unreferenced=reject

test-clean:
$(foreach dir,$(DIRS),(cd $(dir) && cargo insta test --release --unreferenced=delete) &&) :
cargo insta test --release --unreferenced=delete
cd dag_in_context && cargo insta test --release --unreferenced=delete

nits:
npx prettier infra/nightly-resources/*.js --check
@rustup component add clippy
@rustup component add rustfmt
$(foreach dir,$(DIRS),(cd $(dir) && cargo clippy --tests -- -D warnings && cargo fmt --check) &&) :
cargo clippy --tests -- -D warnings && cargo fmt --check
cd dag_in_context && cargo clippy --tests -- -D warnings && cargo fmt --check



Expand Down
2 changes: 1 addition & 1 deletion src/rvsdg/optimize_direct_jumps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl SimpleCfgFunction {
.graph
.edges_directed(target, Direction::Incoming)
.count();
if incoming_to_next == 1 {
if incoming_to_next == 1 && target != node {
Some(target)
} else {
None
Expand Down

0 comments on commit a34c300

Please sign in to comment.