Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhly committed Oct 16, 2023
1 parent fc4b33a commit 14ecd2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/conversions/hashbrown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ where
Err(msg) => {
if let Ok(mappingproxy) = ob.downcast::<PyMappingProxy>() {
let mut ret = hashbrown::HashMap::with_capacity_and_hasher(
mappingproxy.len(),
mappingproxy.len()?,
S::default(),
);
for (k, v) in mappingproxy {
Expand Down
2 changes: 1 addition & 1 deletion src/conversions/indexmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ where
Err(msg) => {
if let Ok(mappingproxy) = ob.downcast::<PyMappingProxy>() {
let mut ret = indexmap::IndexMap::with_capacity_and_hasher(
mappingproxy.len(),
mappingproxy.len()?,
S::default(),
);
for (k, v) in mappingproxy {
Expand Down

0 comments on commit 14ecd2f

Please sign in to comment.