Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
clippy'
Browse files Browse the repository at this point in the history
  • Loading branch information
qwang98 committed Oct 19, 2023
1 parent 70e2e26 commit 02cf550
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/plonkish/backend/powdr_pil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,7 @@ fn convert_to_pil_expr_string<F: Debug + Clone>(
power
)
}
Expr::Query(queriable) => format!(
"{}",
convert_to_pil_queriable_string(queriable, annotations_map)
),
Expr::Query(queriable) => convert_to_pil_queriable_string(queriable, annotations_map),
Expr::Halo2Expr(_) => {
panic!("Halo2 native expression not supported by PIL backend.")
}
Expand All @@ -555,19 +552,19 @@ fn convert_to_pil_queriable_string<F>(
annotations_map: &HashMap<UUID, (UUID, String)>,
) -> String {
match query {
Queriable::Internal(s) => format!("{}", annotations_map.get(&s.uuid()).unwrap().1),
Queriable::Internal(s) => annotations_map.get(&s.uuid()).unwrap().clone().1,
Queriable::Forward(s, rot) => {
let annotation = annotations_map.get(&s.uuid()).unwrap().clone().1;
if !rot {
format!("{}", annotation)
annotation
} else {
format!("{}'", annotation)
}
}
Queriable::Shared(s, rot) => {
let annotation = annotations_map.get(&s.uuid()).unwrap().clone().1;
if rot == 0 {
format!("{}", annotation)
annotation
} else if rot == 1 {
format!("{}'", annotation)
} else {
Expand All @@ -579,7 +576,7 @@ fn convert_to_pil_queriable_string<F>(
Queriable::Fixed(s, rot) => {
let annotation = annotations_map.get(&s.uuid()).unwrap().clone().1;
if rot == 0 {
format!("{}", annotation)
annotation
} else if rot == 1 {
format!("{}'", annotation)
} else {
Expand Down

0 comments on commit 02cf550

Please sign in to comment.