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

chore: implement Clone & Copy common traits #350

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

TieWay59
Copy link
Contributor

Implement Clone & Copy common traits for most structs in src.

Only implement Copy for structs that are simple and trivial to copy.

Reorder the derive fields to be more consistent:

Debug, Default, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash

see: #307

@mindoodoo mindoodoo changed the title Chore: implement Clone & Copy common traits chore: implement Clone & Copy common traits Jul 27, 2023
src/backend/termion.rs Outdated Show resolved Hide resolved
src/backend/crossterm.rs Outdated Show resolved Hide resolved
Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

LGTM with the changes that @mindoodoo mentioned

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #350 (a725684) into main (6f659cf) will not change coverage.
The diff coverage is 25.00%.

❗ Current head a725684 differs from pull request most recent head a229ea3. Consider uploading reports for the commit a229ea3 to get more accurate results

@@           Coverage Diff           @@
##             main     #350   +/-   ##
=======================================
  Coverage   84.76%   84.76%           
=======================================
  Files          40       40           
  Lines        8603     8603           
=======================================
  Hits         7292     7292           
  Misses       1311     1311           
Files Changed Coverage Δ
src/backend/crossterm.rs 0.00% <0.00%> (ø)
src/backend/termion.rs 27.46% <0.00%> (ø)
src/backend/test.rs 43.63% <0.00%> (ø)
src/terminal.rs 55.73% <0.00%> (ø)
src/widgets/calendar.rs 81.06% <0.00%> (ø)
src/widgets/canvas/mod.rs 91.61% <0.00%> (ø)
src/widgets/reflow.rs 98.42% <0.00%> (ø)
src/widgets/scrollbar.rs 87.87% <0.00%> (ø)
src/layout.rs 89.18% <66.66%> (ø)
src/widgets/block.rs 83.97% <100.00%> (ø)
... and 1 more

@joshka joshka enabled auto-merge July 28, 2023 11:02
Implement `Clone & Copy` common traits for most structs in src.

Only implement `Copy` for structs that are simple and trivial to copy.

Reorder the derive fields to be more consistent:

    Debug, Default, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash

see: ratatui-org#307
@joshka joshka added this pull request to the merge queue Jul 28, 2023
Merged via the queue into ratatui-org:main with commit 440f62f Jul 28, 2023
28 checks passed
@joshka
Copy link
Member

joshka commented Jul 28, 2023

Thanks again for the great effort on this!

@joshka joshka added this to the v0.23.0 milestone Aug 21, 2023
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.

None yet

3 participants