We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0173063 commit 004b7b8Copy full SHA for 004b7b8
crates/circuit/src/circuit_data.rs
@@ -171,7 +171,7 @@ impl CircuitData {
171
}
172
if let Some(data) = data {
173
self_.reserve(reserve);
174
- Python::with_gil(|py| -> PyResult<()> { self_.extend(py, data) })?;
+ self_.extend(data)?;
175
176
Ok(self_)
177
@@ -902,7 +902,8 @@ impl CircuitData {
902
Ok(())
903
904
905
- pub fn extend(&mut self, py: Python<'_>, itr: &Bound<PyAny>) -> PyResult<()> {
+ pub fn extend(&mut self, itr: &Bound<PyAny>) -> PyResult<()> {
906
+ let py = itr.py();
907
if let Ok(other) = itr.downcast::<CircuitData>() {
908
let other = other.borrow();
909
// Fast path to avoid unnecessary construction of CircuitInstruction instances.
0 commit comments