Skip to content
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

feat(rust!): Mark DataFrame::new_no_checks and DataFrame::new_no_length_checks unsafe #14443

Merged
merged 8 commits into from
Feb 18, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Feb 12, 2024

Ref #14431 (comment)

Changes

  • Mark the mentioned methods unsafe
  • Update references to use unsafe blocks
  • Use DataFrame::empty and Series::into_frame() where possible, rather than an unsafe call to DataFrame::new_no_checks

@github-actions github-actions bot added internal An internal refactor or improvement rust Related to Rust Polars labels Feb 12, 2024
@stinodego stinodego marked this pull request as ready for review February 12, 2024 20:16
@ritchie46
Copy link
Member

Yes, that one should be marked unsafe as well.

@stinodego stinodego changed the title refactor(rust): Mark DataFrame::new_no_length_checks unsafe refactor(rust!): Mark DataFrame::new_no_length_checks unsafe Feb 14, 2024
@github-actions github-actions bot added the breaking rust Change that breaks backwards compatibility for the Rust crate label Feb 14, 2024
@stinodego stinodego changed the title refactor(rust!): Mark DataFrame::new_no_length_checks unsafe refactor(rust!): Mark DataFrame::new_no_checks and DataFrame::new_no_length_checks unsafe Feb 14, 2024
@stinodego stinodego marked this pull request as draft February 14, 2024 09:45
@stinodego stinodego marked this pull request as ready for review February 14, 2024 09:48
@stinodego stinodego changed the title refactor(rust!): Mark DataFrame::new_no_checks and DataFrame::new_no_length_checks unsafe feat(rust!): Mark DataFrame::new_no_checks and DataFrame::new_no_length_checks unsafe Feb 14, 2024
@stinodego stinodego removed the internal An internal refactor or improvement label Feb 14, 2024
@github-actions github-actions bot added the enhancement New feature or an improvement of an existing feature label Feb 14, 2024
@stinodego stinodego merged commit 76def30 into main Feb 18, 2024
23 checks passed
@stinodego stinodego deleted the df-unsafe branch February 18, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking rust Change that breaks backwards compatibility for the Rust crate enhancement New feature or an improvement of an existing feature rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants