Skip to content

Commit 95a71d4

Browse files
committed
Remove duplicated if branch
1 parent 3af3e3e commit 95a71d4

File tree

1 file changed

+1
-3
lines changed
  • tket/src/serialize/pytket/extension

1 file changed

+1
-3
lines changed

tket/src/serialize/pytket/extension/float.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ impl FloatEmitter {
126126
FloatOps::fmin => format!("min({}, {})", inputs[0], inputs[1]),
127127
FloatOps::fabs => format!("abs({})", inputs[0]),
128128
FloatOps::fdiv => {
129-
if inputs[0] == "1" {
130-
format!("({}) / ({})", inputs[0], inputs[1])
131-
} else if inputs[1] == "1" {
129+
if inputs[1] == "1" {
132130
inputs[0].clone()
133131
} else {
134132
format!("({}) / ({})", inputs[0], inputs[1])

0 commit comments

Comments
 (0)