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

Implement eager parsing, getting rid of lifetime on StyleSource #71

Merged
merged 2 commits into from
Apr 17, 2022

Conversation

WorldSEnder
Copy link
Collaborator

@WorldSEnder WorldSEnder commented Apr 14, 2022

First PR angled towards #70. In evaluating the existing API, the lifetime of on StyleSource, existing only for the parser feature, has been removed. Raw css now gets parsed eagerly and early during conversion into a StyleSource. The feature gated From<str>, ... impls have been changed to TryFrom<str>, ...

This doesn't change the usage for the average user working with css! and other macros. Most of the time (even in existing API) the lifetime was assumed to be 'static anyway.

@WorldSEnder WorldSEnder requested a review from futursolo April 16, 2022 08:50
Copy link
Owner

@futursolo futursolo left a comment

Choose a reason for hiding this comment

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

Sorry, I was quite busy last week and had no time to review till today.

packages/stylist/src/style_src.rs Outdated Show resolved Hide resolved
packages/stylist/src/style_src.rs Show resolved Hide resolved
@WorldSEnder WorldSEnder requested a review from futursolo April 17, 2022 01:00
@futursolo futursolo merged commit fd5ed37 into futursolo:master Apr 17, 2022
@WorldSEnder WorldSEnder deleted the eager-parsing branch April 17, 2022 10:26
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