Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix_clippy_warning
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Dec 14, 2022
2 parents 3bcbd4a + 2411391 commit 6b996be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,21 @@ jobs:
- name: Run examples with release
run: cargo run --example builtin_fn

# example_shadow cargo fmt
- name: Check examples format
run: cargo fmt --all -- --check
working-directory: ./example_shadow

# example_shadow cargo clippy
- name: Check examples with clippy
run: cargo clippy --all -- -D warnings
# example_shadow check
- name: Check example_shadow
run: |
cargo fmt --all -- --check
cargo clippy --all -- -D warnings
cargo run
working-directory: ./example_shadow

# example_shadow cargo run
- name: Run example_shadow
run: cargo run
working-directory: ./example_shadow
# example_shadow_hook check
- name: Check example_shadow_hook
run: |
cargo fmt --all -- --check
cargo clippy --all -- -D warnings
cargo run
working-directory: ./example_shadow_hook

# build on nightly
- uses: actions-rs/toolchain@v1
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,13 @@ impl Shadow {

// append gen const
for k in self.map.keys() {
let tmp = format!(r#"{}println!("{k}:{k}");{}"#, "\t", "\n");
let tmp = format!(r#"{}println!("{k}:{{{k}}}\n");{}"#, "\t", "\n");
print_val.push_str(tmp.as_str());
}

// append gen fn
for k in gen_const {
let tmp = format!(r#"{}println!("{k}:{k}\n");{}"#, "\t", "\n");
let tmp = format!(r#"{}println!("{k}:{{{k}}}\n");{}"#, "\t", "\n");
print_val.push_str(tmp.as_str());
}

Expand Down

0 comments on commit 6b996be

Please sign in to comment.