Port DlltoolFailImportLibrary
and implement IntoDiagnosticArg
for Cow<'a, str>
This commit is contained in:
parent
81f7a8d7f1
commit
c01546fcd6
4 changed files with 26 additions and 6 deletions
|
@ -107,6 +107,12 @@ impl IntoDiagnosticArg for String {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoDiagnosticArg for Cow<'a, str> {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||
DiagnosticArgValue::Str(Cow::Owned(self.into_owned()))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoDiagnosticArg for &'a Path {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||
DiagnosticArgValue::Str(Cow::Owned(self.display().to_string()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue