Skip to content

Add a few AsRef impls to EcoString#55

Merged
laurmaedje merged 1 commit intotypst:mainfrom
tingerrr:tinger/kwnrpypotxxz
Sep 19, 2025
Merged

Add a few AsRef impls to EcoString#55
laurmaedje merged 1 commit intotypst:mainfrom
tingerrr:tinger/kwnrpypotxxz

Conversation

@tingerrr
Copy link
Contributor

Mostly for convenience, I kept running into Path::join(&EcoString) requiring an extra EcoString::as_str().

I left out Borrow because for Paths the Eq requirements dont't hold and &[u8]/OsStr just seems odd.

@laurmaedje
Copy link
Member

I find the coupling to random other types a bit unfortunate, but oh well. In std, the Path/OsStr impls actually live in the path and ffi modules, since the string type is the more general one, but we don't have that luxury here.

@laurmaedje laurmaedje changed the title Add AsRef<T> impls to EcoString Add a few AsRef impls to EcoString Sep 19, 2025
@laurmaedje laurmaedje merged commit 4ff5f41 into typst:main Sep 19, 2025
4 checks passed
@tingerrr tingerrr deleted the tinger/kwnrpypotxxz branch September 19, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants