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

[#579] [#581] Use 'core' and 'alloc' instead of 'std' #581

Merged

Conversation

elBoberido
Copy link
Member

@elBoberido elBoberido commented Jan 11, 2025

Notes for Reviewer

This PR adds the clippy::std_instead_of_core, clippy::std_instead_of_alloc and clippy::alloc_instead_of_core warnings to all crates that are not no_std. This will reduce the work when we tackle the challenge to make the crates no_std.

Where possible, all occurrences of std are replaced with core or alloc.

Pre-Review Checklist for the PR Author

  • Add sensible notes for the reviewer
  • PR title is short, expressive and meaningful
  • Consider switching the PR to a draft (Convert to draft)
    • as draft PR, the CI will be skipped for pushes
  • Relevant issues are linked in the References section
  • Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  • Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  • Commits messages are according to this guideline
  • Tests follow the best practice for testing
  • Changelog updated in the unreleased section including API breaking changes
  • Assign PR to reviewer
  • All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Closes #579
Closes #581

@elBoberido elBoberido changed the title [#579] Use 'core' instead of 'std' [WIP] [#579] Use 'core' instead of 'std' Jan 11, 2025
@elBoberido elBoberido force-pushed the iox-579-use-core-instead-of-std branch 2 times, most recently from 9e41fb6 to d7c8e3f Compare January 11, 2025 16:25
@elBoberido elBoberido force-pushed the iox-579-use-core-instead-of-std branch from d7c8e3f to 6e5eac0 Compare January 11, 2025 16:35
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 67.81609% with 84 lines in your changes missing coverage. Please review.

Project coverage is 79.35%. Comparing base (df775df) to head (775bd31).
Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
iceoryx2/src/waitset.rs 0.00% 7 Missing ⚠️
iceoryx2-cal/src/zero_copy_connection/mod.rs 0.00% 5 Missing ⚠️
iceoryx2-cal/src/event/mod.rs 0.00% 4 Missing ⚠️
iceoryx2-bb/log/src/logger/file.rs 0.00% 3 Missing ⚠️
iceoryx2-bb/posix/src/socket_ancillary.rs 62.50% 3 Missing ⚠️
iceoryx2-bb/lock-free/src/mpmc/unique_index_set.rs 60.00% 2 Missing ⚠️
...oryx2-bb/lock-free/src/spmc/unrestricted_atomic.rs 0.00% 2 Missing ⚠️
iceoryx2-bb/log/src/logger/buffer.rs 0.00% 2 Missing ⚠️
iceoryx2-bb/memory/src/bump_allocator.rs 77.77% 2 Missing ⚠️
iceoryx2-bb/posix/src/ipc_capable.rs 0.00% 2 Missing ⚠️
... and 44 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #581      +/-   ##
==========================================
+ Coverage   79.32%   79.35%   +0.03%     
==========================================
  Files         203      203              
  Lines       25302    25311       +9     
==========================================
+ Hits        20070    20085      +15     
+ Misses       5232     5226       -6     
Files with missing lines Coverage Δ
iceoryx2-bb/derive-macros/src/lib.rs 0.00% <ø> (ø)
iceoryx2-bb/elementary/src/allocator.rs 100.00% <100.00%> (ø)
iceoryx2-bb/elementary/src/math.rs 47.61% <100.00%> (ø)
iceoryx2-bb/elementary/src/owning_pointer.rs 96.00% <100.00%> (ø)
iceoryx2-bb/elementary/src/placement_default.rs 15.68% <ø> (ø)
iceoryx2-bb/elementary/src/relocatable_ptr.rs 100.00% <100.00%> (ø)
iceoryx2-bb/elementary/src/unique_id.rs 100.00% <ø> (ø)
iceoryx2-bb/lock-free/src/mpmc/bit_set.rs 95.23% <100.00%> (ø)
iceoryx2-bb/lock-free/src/spsc/index_queue.rs 86.50% <100.00%> (ø)
iceoryx2-bb/lock-free/src/spsc/queue.rs 96.72% <ø> (ø)
... and 125 more

@elBoberido elBoberido requested a review from elfenpiff January 11, 2025 16:51
@elBoberido elBoberido self-assigned this Jan 11, 2025
@elBoberido elBoberido added the enhancement New feature or request label Jan 11, 2025
@elBoberido elBoberido changed the title [WIP] [#579] Use 'core' instead of 'std' [#579] Use 'core' instead of 'std' Jan 11, 2025
@elBoberido elBoberido linked an issue Jan 11, 2025 that may be closed by this pull request
@elBoberido elBoberido changed the title [#579] Use 'core' instead of 'std' [#579] [#581] Use 'core' instead of 'std' Jan 11, 2025
@elBoberido elBoberido requested a review from elfenpiff January 11, 2025 19:29
@elBoberido elBoberido changed the title [#579] [#581] Use 'core' instead of 'std' [#579] [#581] Use 'core' and 'alloc' instead of 'std' Jan 11, 2025
@elBoberido elBoberido merged commit 57c5b16 into eclipse-iceoryx:main Jan 13, 2025
49 checks passed
@elBoberido elBoberido deleted the iox-579-use-core-instead-of-std branch January 13, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use 'std_instead_of_alloc' clippy warning Use 'std_instead_of_core' clippy warning
2 participants