Skip to content

Commit

Permalink
Support remove_lifetime for Tuple and Array
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt committed Aug 22, 2024
1 parent 9d0fdf7 commit 0277ac7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyo3-stub-gen-derive/src/gen_stub/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ pub fn remove_lifetime(ty: &mut Type) {
rty.lifetime = None;
remove_lifetime(rty.elem.as_mut());
}
Type::Tuple(ty) => {
for elem in &mut ty.elems {
remove_lifetime(elem);
}
}
Type::Array(ary) => {
remove_lifetime(ary.elem.as_mut());
}
_ => {}
}
}
Expand Down

0 comments on commit 0277ac7

Please sign in to comment.