-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove mutability requirement on input from public facing API #18
Remove mutability requirement on input from public facing API #18
Conversation
Wait why did 1.61.0 suddenly start failing? Cargo.lock hasn't changed since the last commit. EDIT: oh I see why, Cargo.lock is specified in UPDATE: A fix for this is made in #20. This will resolve the failing tests for this PR. |
Thanks. Can you also update Having fortran numbering makes metis mutate xadj and adjncy: |
Oh good call, I hadn't noticed that. Yeah, let's remove the Fortran numbering, but what do we do with We could either check on |
Hmm. If we go down the "checks" route as planned in #11 then might as well make |
Alright, I've placed a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
The new Rust version seems to have extra checks on casting
&T
to&mut T
. The Rust-facing API just copies METIS' C API, which accepts pointers to non-const, which is why those casts were needed. But now I'm getting all these errors I figured why not fix the API itself.I went ahead and made all input parameters immutable. In the unsafe blocks where the C API is called is then dealt with casting the
*const T
to*mut T
.