Skip to content
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

Attempt to simplify ZeroCopyFrom #1186

Closed
sffc opened this issue Oct 18, 2021 · 3 comments
Closed

Attempt to simplify ZeroCopyFrom #1186

sffc opened this issue Oct 18, 2021 · 3 comments
Assignees
Labels
C-data-infra Component: provider, datagen, fallback, adapters duplicate This issue or pull request already exists S-small Size: One afternoon (small bug fix or enhancement) T-core Type: Required functionality

Comments

@sffc
Copy link
Member

sffc commented Oct 18, 2021

I think we should be able to move the 'b in ZeroCopyFrom up to the trait and then remove the Yokeable bound. CC @Manishearth

If we add FromVarULE in #1180, we may be able to merge that trait and ZeroCopyFrom.

@sffc sffc added T-core Type: Required functionality C-data-infra Component: provider, datagen, fallback, adapters S-small Size: One afternoon (small bug fix or enhancement) v1 labels Oct 18, 2021
@sffc sffc mentioned this issue Oct 18, 2021
2 tasks
@Manishearth
Copy link
Member

Yeah if we implement ZCF on the Output types instead of the input types stuff will be much nicer, and we'll hit fewer of those compiler bugs.

@Manishearth
Copy link
Member

Manishearth commented Oct 18, 2021

I think then it needs to be

trait ZCF<'a, T>  {
   fn zcf(&'a T) -> Self
}
impl ZCF<'a, str> on Cow<'a, str> {
   fn zcf(&'a str) -> Self
}

This is definitely nicer IMO

@sffc sffc added blocked A dependency must be resolved before this is actionable backlog labels Nov 5, 2021
@Manishearth
Copy link
Member

Oh, we have duplicate issues; oops

#1255

@sffc sffc added the duplicate This issue or pull request already exists label Nov 5, 2021
@sffc sffc removed v1 blocked A dependency must be resolved before this is actionable labels Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-data-infra Component: provider, datagen, fallback, adapters duplicate This issue or pull request already exists S-small Size: One afternoon (small bug fix or enhancement) T-core Type: Required functionality
Projects
None yet
Development

No branches or pull requests

2 participants