Merge pull request #938 from liulinboyi/feat-napi
feat(napi): refine return type
This commit is contained in:
commit
a25612987f
3 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ impl AsMut<[u8]> for Buffer {
|
||||||
impl Deref for Buffer {
|
impl Deref for Buffer {
|
||||||
type Target = [u8];
|
type Target = [u8];
|
||||||
|
|
||||||
fn deref(&self) -> &[u8] {
|
fn deref(&self) -> &Self::Target {
|
||||||
self.inner.as_slice()
|
self.inner.as_slice()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,7 +216,7 @@ impl AsMut<[u8]> for JsArrayBufferValue {
|
||||||
impl Deref for JsArrayBufferValue {
|
impl Deref for JsArrayBufferValue {
|
||||||
type Target = [u8];
|
type Target = [u8];
|
||||||
|
|
||||||
fn deref(&self) -> &[u8] {
|
fn deref(&self) -> &Self::Target {
|
||||||
self.as_ref()
|
self.as_ref()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ impl AsMut<[u8]> for JsBufferValue {
|
||||||
impl Deref for JsBufferValue {
|
impl Deref for JsBufferValue {
|
||||||
type Target = [u8];
|
type Target = [u8];
|
||||||
|
|
||||||
fn deref(&self) -> &[u8] {
|
fn deref(&self) -> &Self::Target {
|
||||||
self.data.as_slice()
|
self.data.as_slice()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue