Use a SmallString for the Yanked enum (#11715)

## Summary

This is stored on `File`, which we create extensively. Easy way to
reduce size.
This commit is contained in:
Charlie Marsh 2025-02-24 09:03:56 -10:00 committed by GitHub
parent 1f7f9fdeb4
commit 4fc181dbf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 4 deletions

View file

@ -184,7 +184,7 @@ impl SimpleHtml {
let yanked = if let Some(yanked) = link.attributes().get("data-yanked").flatten() {
let yanked = std::str::from_utf8(yanked.as_bytes())?;
let yanked = html_escape::decode_html_entities(yanked);
Some(Yanked::Reason(yanked.to_string()))
Some(Yanked::Reason(yanked.into()))
} else {
None
};