Merge pull request #1583 from Pauan/asref

Adding in AsRef impl for all wasm_bindgen types
This commit is contained in:
Alex Crichton 2019-06-10 09:05:22 -05:00 committed by GitHub
commit 2e05b62013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -703,6 +703,11 @@ impl ToTokens for ast::ImportType {
fn as_ref(&self) -> &JsValue { self.obj.as_ref() }
}
impl AsRef<#rust_name> for #rust_name {
#[inline]
fn as_ref(&self) -> &#rust_name { self }
}
impl From<#rust_name> for JsValue {
#[inline]