Skip to content

Commit 039114d

Browse files
fixed some warnings
1 parent ce50def commit 039114d

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

amqp-type/src/amqp_type.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::hash::Hash;
22

33
use bigdecimal::num_traits::ToBytes;
4-
use indexmap::IndexMap;
54

65
use crate::binary::Binary;
76
use crate::collection::*;
@@ -444,6 +443,7 @@ impl From<Array> for AmqpType {
444443
#[cfg(test)]
445444
mod tests {
446445
use super::*;
446+
use indexmap::IndexMap;
447447

448448
#[test]
449449
fn construct_null() {
@@ -657,7 +657,7 @@ mod tests {
657657
#[test]
658658
fn construct_list_with_less_than_255_elements_and_larger_than_255_bytes() {
659659
let mut arr = vec![];
660-
for i in 0..100 {
660+
for _ in 0..100 {
661661
arr.push("aaaaaaaaaaaaaaaaaaaa".into());
662662
}
663663
let val = AmqpType::List(arr.into());
@@ -699,7 +699,7 @@ mod tests {
699699
#[test]
700700
fn construct_array_with_less_than_255_elements_and_larger_than_255_bytes() {
701701
let mut arr = vec![];
702-
for i in 0..100 {
702+
for _ in 0..100 {
703703
arr.push("aaaaaaaaaaaaaaaaaaaa".into());
704704
}
705705
let val = AmqpType::Array(arr.into());

amqp-type/src/collection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Encode for Array {
5252
impl From<EncodedVec> for Vec<u8> {
5353
fn from(value: EncodedVec) -> Self {
5454
let mut res = Vec::new();
55-
for mut val in value.0 {
55+
for val in value.0 {
5656
let mut enc: Vec<u8> = val.into();
5757
res.append(&mut enc);
5858
}
@@ -79,7 +79,7 @@ impl From<Vec<AmqpType>> for Array {
7979
}
8080

8181
impl Hash for Map {
82-
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
82+
fn hash<H: std::hash::Hasher>(&self, _state: &mut H) {
8383
todo!()
8484
}
8585
}

amqp-type/src/decimal.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
use crate::amqp_type::{Constructor, Encode};
21
use bigdecimal::BigDecimal;
32

3+
use crate::amqp_type::Encode;
4+
45
use super::amqp_type::Encoded;
56

67
#[derive(Hash, Eq, PartialEq)]

amqp-type/src/error.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ use thiserror::Error;
22

33
#[derive(Error, Debug)]
44
pub enum AppError {
5-
#[error("Malformed Frame: {0}")]
6-
MalformedFrame(&'static str),
75
#[error("Encountered an IO Error.")]
86
IoError(#[from] std::io::Error),
97
}

0 commit comments

Comments
 (0)