Skip to content

Commit 7ff3363

Browse files
committed
Replace for loop in properties getter with a hashmap clone
1 parent 933d22e commit 7ff3363

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pyreccaster/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ impl PyRecord {
4040

4141
#[getter]
4242
fn properties(&self) -> PyResult<HashMap<String, String>> {
43-
let mut properties: HashMap<String, String> = HashMap::new();
44-
for (key, value) in &self.0.properties {
45-
properties.insert(key.into(), value.into());
46-
}
47-
Ok(properties)
43+
Ok(self.0.properties.clone())
4844
}
4945

5046
}

0 commit comments

Comments
 (0)