Skip to content

Commit

Permalink
remove dummy code
Browse files Browse the repository at this point in the history
  • Loading branch information
Taowyoo committed Jan 6, 2023
1 parent b9db57a commit 5eb8ce9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mbedtls/src/pk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ impl Pk {

pub fn write_private_der_vec(&mut self) -> Result<Vec<u8>> {
crate::private::alloc_vec_repeat(
|buf, size| { let _ = &self; unsafe { pk_write_key_der(&mut self.inner, buf, size) } },
|buf, size| { unsafe { pk_write_key_der(&mut self.inner, buf, size) } },
true,
)
}
Expand All @@ -886,7 +886,7 @@ impl Pk {
}

pub fn write_private_pem_string(&mut self) -> Result<String> {
crate::private::alloc_string_repeat(|buf, size| { let _ = &self; unsafe {
crate::private::alloc_string_repeat(|buf, size| { unsafe {
match pk_write_key_pem(&mut self.inner, buf as _, size) {
0 => crate::private::cstr_to_slice(buf as _).len() as _,
r => r,
Expand All @@ -906,7 +906,7 @@ impl Pk {

pub fn write_public_der_vec(&mut self) -> Result<Vec<u8>> {
crate::private::alloc_vec_repeat(
|buf, size| { let _ = &self; unsafe { pk_write_pubkey_der(&mut self.inner, buf, size) } },
|buf, size| { unsafe { pk_write_pubkey_der(&mut self.inner, buf, size) } },
true,
)
}
Expand All @@ -922,7 +922,7 @@ impl Pk {
}

pub fn write_public_pem_string(&mut self) -> Result<String> {
crate::private::alloc_string_repeat(|buf, size| { let _ = &self; unsafe {
crate::private::alloc_string_repeat(|buf, size| { unsafe {
match pk_write_pubkey_pem(&mut self.inner, buf as _, size) {
0 => crate::private::cstr_to_slice(buf as _).len() as _,
r => r,
Expand Down

0 comments on commit 5eb8ce9

Please sign in to comment.