feat(napi): TypeName and ToNapiValue should apply to any HashMap
This commit is contained in:
parent
53fe4d3aa5
commit
8fc1cfcb38
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ use std::hash::Hash;
|
||||||
|
|
||||||
use crate::bindgen_prelude::{Env, Result, ToNapiValue, *};
|
use crate::bindgen_prelude::{Env, Result, ToNapiValue, *};
|
||||||
|
|
||||||
impl<K, V> TypeName for HashMap<K, V> {
|
impl<K, V, S> TypeName for HashMap<K, V, S> {
|
||||||
fn type_name() -> &'static str {
|
fn type_name() -> &'static str {
|
||||||
"HashMap"
|
"HashMap"
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ impl<K, V> TypeName for HashMap<K, V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K, V> ToNapiValue for HashMap<K, V>
|
impl<K, V, S> ToNapiValue for HashMap<K, V, S>
|
||||||
where
|
where
|
||||||
K: AsRef<str>,
|
K: AsRef<str>,
|
||||||
V: ToNapiValue,
|
V: ToNapiValue,
|
||||||
|
|
Loading…
Reference in a new issue