Merge pull request #938 from liulinboyi/feat-napi

feat(napi): refine return type
This commit is contained in:
yiliuliuyi 2021-12-18 13:29:19 +08:00 committed by GitHub
commit a25612987f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -37,7 +37,7 @@ impl AsMut<[u8]> for Buffer {
impl Deref for Buffer {
type Target = [u8];
fn deref(&self) -> &[u8] {
fn deref(&self) -> &Self::Target {
self.inner.as_slice()
}
}

View file

@ -216,7 +216,7 @@ impl AsMut<[u8]> for JsArrayBufferValue {
impl Deref for JsArrayBufferValue {
type Target = [u8];
fn deref(&self) -> &[u8] {
fn deref(&self) -> &Self::Target {
self.as_ref()
}
}

View file

@ -86,7 +86,7 @@ impl AsMut<[u8]> for JsBufferValue {
impl Deref for JsBufferValue {
type Target = [u8];
fn deref(&self) -> &[u8] {
fn deref(&self) -> &Self::Target {
self.data.as_slice()
}
}