Use Arc<str> instead of String

This commit is contained in:
C0D3 M4513R
2024-05-29 20:54:41 +02:00
parent 1ef3d7da88
commit 5a9f0bb011

View File

@ -39,6 +39,9 @@ sed -i 's/Result<models::CurrentUser, Error<GetCurrentUserError>>/Result<models:
cp patches/tags.rs src/models
echo "pub mod tags;" >> src/models/mod.rs
sed -i 's/tags: Vec<String>/tags: Vec<crate::models::tags::Tags>/g' src/models/*.rs
sed -Ei 's/(:[a-zA-Z0-9 \-_<>]*)String/\1std::sync::Arc<str>/g' src/models/*.rs
sed -Ei 's/serde = "(.*)"/serde = {version = "\1", features = ["rc"]}/g' Cargo.toml
sed -Ei 's/#\[derive\((.*)(, )?Default(, )?/#[derive(\1/g' src/models/*.rs
echo "" >> Cargo.toml
echo "[dependencies.log]" >> Cargo.toml
echo "version = \"0.4\"" >> Cargo.toml