Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate user agent string to
Cow<'static, str>
.
In most scenarios, where the user of Servo will not override the default user agent, the user agent can be a `&'static str`. But since we allow for customization, we currently use a `String` to represent the user agent. This commit migrates the user agent to be represented as a `Cow<'static, str>`, which (at the cost of ergonomics) prevents unnecessary allocations whenever cloning the user agent string in the scenario the user doesn't override the user agent.
- Loading branch information
Showing
7 changed files
with
66 additions
and
63 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.