Skip to content

Commit

Permalink
fixed mut related error
Browse files Browse the repository at this point in the history
  • Loading branch information
calbaker committed Apr 18, 2024
1 parent ebb89ef commit 75f535e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/altrios-core/altrios-proc-macros/src/altrios_api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ pub(crate) fn altrios_api(attr: TokenStream, item: TokenStream) -> TokenStream {
quote! {
#[new]
/// Rust-defined `__new__` magic method for Python used exposed via PyO3.
fn __new__(v: &mut Vec<#contained_dtype>) -> PyResult<Self> {
fn __new__(v: Vec<#contained_dtype>) -> PyResult<Self> {
let mut v = v.clone();
v.init()?;
Self(v)
}
Expand Down

0 comments on commit 75f535e

Please sign in to comment.