Open
Conversation
cyqsimon
commented
Mar 25, 2026
cyqsimon
commented
Mar 25, 2026
Comment on lines
-93
to
+99
| self.syntax_set_cell | ||
| .get_or_try_init(|| self.serialized_syntax_set.deserialize()) | ||
| // IMPRV: OnceCell::get_mut_or_init is preferable once stabalized | ||
| match self.syntax_set_cell.get() { | ||
| Some(set) => Ok(set), | ||
| None => { | ||
| let syntax_set = self.serialized_syntax_set.deserialize()?; | ||
| Ok(self.syntax_set_cell.get_or_init(|| syntax_set)) | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This works but obviously is less than ideal.
I'll leave this decision up to maintains, whether the benefit of removing an external dependency outweighs the drawback of having this workaround.
2ddadc4 to
f8a4ddf
Compare
- Standard library now has all the features we need
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Queued behind #3652. Will rebase once (or if) that one is merged.
stdnow hasallalmost all the features fromonce_cellwe need, and they have been stable well before our current MSRV. I think it's now okay to remove this dependency.