Skip to content

Commit

Permalink
chore: clippy and general cleanup of debugger (#3957)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

Clippy fixes along with small changes after #3938 


## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Jan 5, 2024
1 parent c8bfa72 commit d731103
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tooling/debugger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ edition.workspace = true
license.workspace = true

[build-dependencies]
rustc_version = "0.4.0"
build-data.workspace = true

[dependencies]
Expand Down
10 changes: 0 additions & 10 deletions tooling/debugger/build.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
use rustc_version::{version, Version};
use std::fs::File;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::{env, fs};

fn check_rustc_version() {
assert!(
version().unwrap() >= Version::parse("1.71.1").unwrap(),
"The minimal supported rustc version is 1.71.1."
);
}

const GIT_COMMIT: &&str = &"GIT_COMMIT";

fn main() {
// Rebuild if the tests have changed
println!("cargo:rerun-if-changed=tests");

check_rustc_version();

// Only use build_data if the environment variable isn't set
// The environment variable is always set when working via Nix
if std::env::var(GIT_COMMIT).is_err() {
Expand Down
4 changes: 2 additions & 2 deletions tooling/debugger/tests/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mod tests {
dbg_session
.execute(
&format!("{} debug --program-dir {}", nargo_bin, test_program_dir),
&format!(".*\\Starting debugger.*"),
".*\\Starting debugger.*",
)
.expect("Could not start debugger");

Expand All @@ -49,7 +49,7 @@ mod tests {
// having successfully solved the circuit witness.
dbg_session.send_line("quit").expect("Failed to quit debugger");
dbg_session
.exp_regex(&format!(".*Circuit witness successfully solved.*"))
.exp_regex(".*Circuit witness successfully solved.*")
.expect("Expected circuit witness to be successfully solved.");
}
}

0 comments on commit d731103

Please sign in to comment.