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!: rework text #55

Merged
merged 4 commits into from
Jun 29, 2020
Merged

feat!: rework text #55

merged 4 commits into from
Jun 29, 2020

Conversation

cakekindel
Copy link
Owner

@cakekindel cakekindel commented Jun 29, 2020

This change brings the enum / contents pattern to the Text object, breaking its monolithic declaration into multiple mods and structs. This comes with a host of ergonomics improvements, like lots of handy conversions - for example if there is an fn of type fn foo(text: impl Into<text::Plain>) -> Foo, you can invoke it with a text::Plain, a string literal, or a String.

BREAKING!: text is now an enum of single-element tuples. Those tuples point to separate structure definitions for the different kinds of Text objects.

BREAKING!: text is now publicly used at the crate root, breaking glob imports like slack_blocks::* if there's a local code element named text

src/blocks/input.rs Outdated Show resolved Hide resolved
@cakekindel cakekindel merged commit 3573f44 into master Jun 29, 2020
@cakekindel cakekindel deleted the text-refactor branch June 29, 2020 02:38
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.

1 participant