Skip to content

feat: Add array clone and discard ops #2100

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

Merged
merged 6 commits into from
Apr 24, 2025
Merged

Conversation

mark-koch
Copy link
Contributor

@mark-koch mark-koch commented Apr 22, 2025

See #2097 for context

@mark-koch mark-koch requested a review from a team as a code owner April 22, 2025 08:26
@mark-koch mark-koch requested review from ss2165 and removed request for a team April 22, 2025 08:26
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 85.79235% with 26 lines in your changes missing coverage. Please review.

Project coverage is 82.98%. Comparing base (078dfc5) to head (7e388fd).
Report is 1 commits behind head on feat/arrays.

Files with missing lines Patch % Lines
...rc/std_extensions/collections/array/array_clone.rs 86.17% 11 Missing and 2 partials ⚠️
.../std_extensions/collections/array/array_discard.rs 85.05% 11 Missing and 2 partials ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           feat/arrays    #2100      +/-   ##
===============================================
+ Coverage        82.96%   82.98%   +0.01%     
===============================================
  Files              223      225       +2     
  Lines            41839    42022     +183     
  Branches         37865    38048     +183     
===============================================
+ Hits             34713    34870     +157     
- Misses            5321     5343      +22     
- Partials          1805     1809       +4     
Flag Coverage Δ
python 85.65% <ø> (ø)
rust 82.70% <85.79%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than construction confusions


impl<AK: ArrayKind> GenericArrayClone<AK> {
/// Creates a new array clone op.
pub fn new(elem_ty: Type, size: u64) -> Option<Self> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this return Result rather than option?

at the very least docstring should explain the return type

Base automatically changed from mk/arrays to feat/arrays April 23, 2025 13:42
@mark-koch mark-koch requested a review from ss2165 April 23, 2025 14:02
Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo + formatting suggestion

impl<AK: ArrayKind> GenericArrayClone<AK> {
/// Creates a new array clone op.
///
/// Returns an error if the proveded element type is not copyable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Returns an error if the proveded element type is not copyable.
/// # Errors
/// If the provided element type is not copyable.

@mark-koch mark-koch merged commit 0a01a2f into feat/arrays Apr 24, 2025
25 checks passed
@mark-koch mark-koch deleted the arrays/clone-discard branch April 24, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants