feat: wit-bindgen-sample

This commit is contained in:
2022-07-23 10:48:31 +08:00
parent a116b1c2e6
commit 7d769d3a0f
5 changed files with 31 additions and 22 deletions

View File

@@ -14,9 +14,9 @@ impl FnResult {
}
}
pub fn success(result: String) -> Self {
pub fn success(result: impl Into<String>) -> Self {
FnResult {
result: Some(result),
result: Some(result.into()),
error: None,
}
}