Skip to content

Commit

Permalink
resolve warnings
Browse files Browse the repository at this point in the history
This patch resolves active warnings that are not necessary.

Signed-off-by: Amy Parker <amy@amyip.net>
  • Loading branch information
amyipdev committed Feb 22, 2024
1 parent 7b35a92 commit ca53d02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/aes.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io::{Error, ErrorKind};

use aes_gcm_siv::{
aead::{Aead, OsRng},
aead::Aead,
Aes256GcmSiv, KeyInit, Nonce,
};
use rand::RngCore;
Expand Down
4 changes: 1 addition & 3 deletions src/bson.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::io::{Error, ErrorKind};

use bson::spec::BinarySubtype;
use bson::{bson, Binary, Bson, Document};
use serde::ser::{SerializeStruct, Serializer};
use bson::Document;
use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, PartialEq, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/padding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn encapsulate(pkt: &[u8]) -> Vec<u8> {
back_pad.insert(0, '}' as u8);

// define a new vector to add the front pad, the packet, and finally the back pad
let mut encapsulated_pkt = Vec::with_capacity((pkt.len() + front_pad.len() + back_pad.len()));
let mut encapsulated_pkt = Vec::with_capacity(pkt.len() + front_pad.len() + back_pad.len());
encapsulated_pkt.extend(front_pad);
encapsulated_pkt.extend(pkt);
encapsulated_pkt.extend(back_pad);
Expand Down

0 comments on commit ca53d02

Please sign in to comment.