Optimize CratesToml

Use Box<str> instead of String

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2025-06-06 18:13:23 +10:00 committed by GitHub
parent 28525359d3
commit 083fe61aca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,7 @@ use crate_version_source::*;
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CratesToml<'a> {
#[serde(with = "tuple_vec_map")]
v1: Vec<(String, Cow<'a, [CompactString]>)>,
v1: Vec<(Box<str>, Cow<'a, [CompactString]>)>,
}
impl<'v1> CratesToml<'v1> {