fix: add support for String as well

This commit is contained in:
2023-03-13 20:33:24 +01:00
committed by Kasper Juul Hermansen
parent e9e35edb1c
commit c025d17424
4 changed files with 49 additions and 1 deletions

View File

@@ -18,5 +18,11 @@ pub fn render_scalar(t: &FullType) -> eyre::Result<rust::Tokens> {
$(t.name.pipe(|n| format_name(n)))(self.to_string())
}
}
impl Into<$(t.name.pipe(|n| format_name(n)))> for String {
fn into(self) -> $(t.name.pipe(|n| format_name(n))) {
$(t.name.pipe(|n| format_name(n)))(self.clone())
}
}
})
}