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(span): add setters for content and style #647

Merged
merged 1 commit into from
Dec 5, 2023
Merged

feat(span): add setters for content and style #647

merged 1 commit into from
Dec 5, 2023

Conversation

joshka
Copy link
Member

@joshka joshka commented Nov 26, 2023

No description provided.

Copy link

codecov bot commented Nov 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (37c70db) 90.8% compared to head (9087e39) 90.9%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #647   +/-   ##
=====================================
  Coverage   90.8%   90.9%           
=====================================
  Files         42      42           
  Lines      12509   12533   +24     
=====================================
+ Hits       11370   11394   +24     
  Misses      1139    1139           

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

src/text/span.rs Outdated Show resolved Hide resolved
@SOF3
Copy link
Contributor

SOF3 commented Nov 27, 2023

Actually these should be called "fluent setters" not "builder methods". Builder methods usually refer to a separate builder object that may have incomplete fields and need to be consumed to become the built object, e.g. https://docs.rs/typed-builder.

@joshka
Copy link
Member Author

joshka commented Nov 27, 2023

Actually these should be called "fluent setters" not "builder methods". Builder methods usually refer to a separate builder object that may have incomplete fields and need to be consumed to become the built object, e.g. https://docs.rs/typed-builder.

Good point.

Copy link
Sponsor Member

@orhun orhun left a comment

Choose a reason for hiding this comment

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

LGTM, as mentioned, we might change it to "fluent setters" before merge.

Copy link
Member

@Valentin271 Valentin271 left a comment

Choose a reason for hiding this comment

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

Other than the typo, looks good

src/text/span.rs Outdated Show resolved Hide resolved
@joshka
Copy link
Member Author

joshka commented Dec 5, 2023

Rebased and squashed - should be good to go

Co-authored-by: Valentin271 <36198422+Valentin271@users.noreply.github.com>
@joshka joshka changed the title feat(span): add builder methods for content and style feat(span): add setters for content and style Dec 5, 2023
@joshka
Copy link
Member Author

joshka commented Dec 5, 2023

Tweaked must_use message to:

    #[must_use = "method moves the value of self and returns the modified value"]

Based on discussion in #655

Copy link
Member

@Valentin271 Valentin271 left a comment

Choose a reason for hiding this comment

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

Fine by me, approved

@joshka joshka merged commit 4424637 into main Dec 5, 2023
36 checks passed
@joshka joshka deleted the span-methods branch December 5, 2023 09:17
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

4 participants