Skip to content

Commit

Permalink
Merge pull request #68 from open-quantum-safe/clippy-warnings
Browse files Browse the repository at this point in the history
address two clippy warnings
  • Loading branch information
thomwiggers authored Jun 8, 2021
2 parents c4163b4 + fa4289c commit 2e9a27a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions oqs/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ macro_rules! newtype_buffer {
$name_ref { bytes }
}

/// Copy this to the owned variant
pub fn to_owned(&self) -> $name {
/// Clone this into the owned variant
pub fn to_owned(self) -> $name {
$name {
bytes: self.bytes.to_vec(),
}
Expand Down Expand Up @@ -70,6 +70,7 @@ macro_rules! newtype_buffer {

impl $name {
/// Length in bytes
#[allow(clippy::len_without_is_empty)]
pub fn len(&self) -> usize {
self.bytes.len()
}
Expand Down

0 comments on commit 2e9a27a

Please sign in to comment.