Skip to content

Commit 2e9a27a

Browse files
authored
Merge pull request #68 from open-quantum-safe/clippy-warnings
address two clippy warnings
2 parents c4163b4 + fa4289c commit 2e9a27a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

oqs/src/macros.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ macro_rules! newtype_buffer {
3535
$name_ref { bytes }
3636
}
3737

38-
/// Copy this to the owned variant
39-
pub fn to_owned(&self) -> $name {
38+
/// Clone this into the owned variant
39+
pub fn to_owned(self) -> $name {
4040
$name {
4141
bytes: self.bytes.to_vec(),
4242
}
@@ -70,6 +70,7 @@ macro_rules! newtype_buffer {
7070

7171
impl $name {
7272
/// Length in bytes
73+
#[allow(clippy::len_without_is_empty)]
7374
pub fn len(&self) -> usize {
7475
self.bytes.len()
7576
}

0 commit comments

Comments
 (0)