-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add from_path
and from_string
variants that don't buffer output
#86
Closed
Commits on Oct 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e365bf8 - Browse repository at this point
Copy the full SHA e365bf8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41af10d - Browse repository at this point
Copy the full SHA 41af10dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0471b82 - Browse repository at this point
Copy the full SHA 0471b82View commit details -
Don't buffer serializer output
A `Serializer` now receives an instance of `std::io::Write`. This means that we can no longer write the UTF-8 BOM nor the `@charset "UTF-8" directive when serialization is done and instead do the ASCII-content check while visiting the AST. All `inspect_*` methods now create a temporary buffer and pass it to a `Serializer`. Then they (unsafely) interpret the buffer as a UTF-8 string. The goal is to avoid this extra set of allocations and always write directly to the writer passed by the API user. We also removed some extra allocations marked with todo comments.
Configuration menu - View commit details
-
Copy full SHA for c015fb2 - Browse repository at this point
Copy the full SHA c015fb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8d607a - Browse repository at this point
Copy the full SHA a8d607aView commit details -
Move main file to new
Serializer
APIThis also adds a public API to write the output of a compiled set of SASS files into a `Write`. We should add a recommendation to the rustdoc about passing a buffered writer; otherwise performance will probably be horrible. The previous `String`-based APIs were also moved to this new set of APIs by creating a temporary `Vec<u8>` buffer, passing it to the serializer, and finally (unsafely) reinterpreting the buffer contents as a UTF-8 string.
Configuration menu - View commit details
-
Copy full SHA for 76c754c - Browse repository at this point
Copy the full SHA 76c754cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f79973a - Browse repository at this point
Copy the full SHA f79973aView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa482f1 - Browse repository at this point
Copy the full SHA fa482f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ebcee4 - Browse repository at this point
Copy the full SHA 8ebcee4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58bf99e - Browse repository at this point
Copy the full SHA 58bf99eView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa8f221 - Browse repository at this point
Copy the full SHA aa8f221View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70f4896 - Browse repository at this point
Copy the full SHA 70f4896View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8e281a - Browse repository at this point
Copy the full SHA f8e281aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 152a635 - Browse repository at this point
Copy the full SHA 152a635View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.