Skip to content

Commit

Permalink
cargo clippy by CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kenarab committed Jun 5, 2024
1 parent a564e68 commit 0f9a907
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/concrete_driver/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub fn compile_program_with_args(
&session.output_file.with_extension(""),
)?;
}
if linearity_errors.len() > 0 {
if !linearity_errors.is_empty() {
let error = build_test_linearity_error(&linearity_errors[0]);
Err(error)
} else {
Expand All @@ -176,7 +176,7 @@ pub fn build_test_linearity_error(
) -> Box<dyn std::error::Error> {
let mut ret = "Linearity check failed<".to_string();
ret.push_str(&linearity_error.to_string());
ret.push_str(">");
ret.push('>');
Box::new(TestError(ret.into()))
}

Expand All @@ -194,6 +194,7 @@ pub fn compile_and_run(source: &str, name: &str, library: bool, optlevel: OptLev
output.status.code().unwrap()
}

#[cfg(test)]
#[track_caller]
pub fn compile_and_run_with_args(
source: &str,
Expand Down

0 comments on commit 0f9a907

Please sign in to comment.