Fixed documentation of threadsafe functions

This commit is contained in:
Michael Orenstein 2020-07-26 17:46:45 +09:30
parent 2f084d84c8
commit 74cd9c49c2
No known key found for this signature in database
GPG key ID: C452206F766B1FAD

View file

@ -45,12 +45,10 @@ pub trait ToJs: Copy + Clone {
///
/// impl ToJs for HandleNumber {
/// type Output = u8;
/// type JsValue = JsNumber;
///
/// fn resolve(&self, env: &mut Env, output: Self::Output) -> Result<(u64, Self::JsValue)> {
/// let argv: u64 = 1;
/// let value = env.create_uint32(output as u32)?;
/// Ok((argv, value))
/// fn resolve(&self, env: &mut Env, output: Self::Output) -> Result<Vec<JsUnknown>> {
/// let value = env.create_uint32(output as u32)?.into_unknown()?;
/// Ok(vec![value])
/// }
/// }
///