forked from toml-rs/toml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Delay generate repr (toml-rs#202)
When parsing, we create the `Value`, which will cause a default repr to be generated. We then overwrite it with the actual repr. Similarly, when indexing, we generate a repr for the `Key` but usually throw that key away. This makes it so we only generate a repr when needed, and allows the user to force a default repr. The downside is that anything with a default repr will be re-generated multiple times if the user renders the document multiple times. This is probably rare. As we expand our formatting support though, we should consider a "fill in details where non-exist", so that all goes away.
- Loading branch information
Showing
11 changed files
with
308 additions
and
248 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.