-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Labels
C-data-infraComponent: provider, datagen, fallback, adaptersComponent: provider, datagen, fallback, adaptersS-smallSize: One afternoon (small bug fix or enhancement)Size: One afternoon (small bug fix or enhancement)T-enhancementType: Nice-to-have but not requiredType: Nice-to-have but not requiredhelp wantedIssue needs an assigneeIssue needs an assignee
Description
Part of #1082
Split from #1179
If we want to support cases where the target type borrows from the VarULE, FromVarULE
can work (playground):
trait FromVarULE<'a, U: ?Sized>: 'a {
fn from_var_ule(ule: &'a U) -> Self;
}
impl FromVarULE<'_, str> for String {
fn from_var_ule(ule: &str) -> Self {
ule.to_string()
}
}
impl<'a> FromVarULE<'a, str> for Cow<'a, str> {
fn from_var_ule(ule: &'a str) -> Self {
Cow::Borrowed(ule)
}
}
Thoughts? Needs input from:
Metadata
Metadata
Assignees
Labels
C-data-infraComponent: provider, datagen, fallback, adaptersComponent: provider, datagen, fallback, adaptersS-smallSize: One afternoon (small bug fix or enhancement)Size: One afternoon (small bug fix or enhancement)T-enhancementType: Nice-to-have but not requiredType: Nice-to-have but not requiredhelp wantedIssue needs an assigneeIssue needs an assignee