Fix warnings.

This commit is contained in:
whitequark 2017-09-15 06:05:41 +00:00
parent e8788be3a0
commit be0dcb145c
2 changed files with 7 additions and 8 deletions

View File

@ -2,7 +2,6 @@
// the parts of RFC 1122 that discuss TCP.
use core::{cmp, fmt};
use managed::Managed;
use {Error, Result};
use phy::DeviceLimits;
@ -1266,7 +1265,7 @@ mod test {
window_len: 256, max_seg_size: None,
payload: &[]
};
const RECV_IP_TEMPL: IpRepr = IpRepr::Unspecified {
const _RECV_IP_TEMPL: IpRepr = IpRepr::Unspecified {
src_addr: REMOTE_IP, dst_addr: LOCAL_IP,
protocol: IpProtocol::Tcp, payload_len: 20
};
@ -1409,7 +1408,7 @@ mod test {
// =========================================================================================//
#[test]
fn test_closed_reject() {
let mut s = socket();
let s = socket();
assert_eq!(s.state, State::Closed);
let tcp_repr = TcpRepr {
@ -1483,7 +1482,7 @@ mod test {
#[test]
fn test_listen_syn_reject_ack() {
let mut s = socket_listen();
let s = socket_listen();
let tcp_repr = TcpRepr {
control: TcpControl::Syn,

View File

@ -1,5 +1,5 @@
use core::cmp;
use managed::{Managed, ManagedSlice};
use managed::ManagedSlice;
use {Error, Result};
use super::Resettable;
@ -380,7 +380,7 @@ mod test {
assert_eq!(ring.len(), 8);
assert_eq!(&ring.storage[..], b"abcdefgh....");
for i in 0..4 {
for _ in 0..4 {
*ring.dequeue_one().unwrap() = b'.';
}
assert_eq!(ring.len(), 4);
@ -402,7 +402,7 @@ mod test {
assert_eq!(ring.len(), 12);
assert_eq!(&ring.storage[..], b"abcdefghijkl");
for i in 0..4 {
for _ in 0..4 {
*ring.dequeue_one().unwrap() = b'.';
}
assert_eq!(ring.len(), 8);
@ -430,7 +430,7 @@ mod test {
assert_eq!(ring.len(), 8);
assert_eq!(&ring.storage[..], b"abcdefgh....");
for i in 0..4 {
for _ in 0..4 {
*ring.dequeue_one().unwrap() = b'.';
}
assert_eq!(ring.len(), 4);