Skip to content

Support Path origins #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
epage opened this issue Nov 23, 2020 · 1 comment
Closed

Support Path origins #39

epage opened this issue Nov 23, 2020 · 1 comment
Labels
C-enhancement Category: enhancement

Comments

@epage
Copy link
Contributor

epage commented Nov 23, 2020

I'd like to have a function return a Snippet but origin is a &str and I have a PathBuf. I can convert it to a Cow<str> but I wouldn't be able to return the Snippet.

@scrabsha
Copy link

IMO, storing origin in a Path or PathBuf does not make sense here. These snippet will be printed on the console. As such, they must be UTF-8 valid.

However, being able to store origin in a Cow<str> may solve your problem.

@epage epage added the C-enhancement Category: enhancement label Mar 13, 2024
@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants