pull/355/head
Dennis Schwerdel 2023-10-07 01:12:47 +02:00
parent 2505679021
commit ca220ded0c
2 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ include!(".code.rs");
pub use error::Error;
use util::{MockTimeSource, MsgBuffer};
use types::{Address, Range};
use table::{ClaimTable};
use table::ClaimTable;
use device::Type;
use config::Config;
use payload::{Packet, Frame, Protocol};
@ -29,7 +29,7 @@ fn udp_send(c: &mut Criterion) {
let mut g = c.benchmark_group("udp_send");
g.throughput(Throughput::Bytes(1400));
g.bench_function("udp_send", |b| {
b.iter(|| sock.send_to(&data, &addr).unwrap());
b.iter(|| sock.send_to(&data, addr).unwrap());
});
g.finish();
}

View File

@ -17,7 +17,7 @@ use util::{MockTimeSource, MsgBuffer};
use config::Config;
use types::{Address, Range};
use device::Type;
use table::{ClaimTable};
use table::ClaimTable;
use payload::{Packet, Frame, Protocol};
use crypto::core::{create_dummy_pair, EXTRA_LEN};
use tests::common::{TunSimulator, TapSimulator};
@ -26,7 +26,7 @@ fn udp_send() {
let sock = UdpSocket::bind("127.0.0.1:0").unwrap();
let data = [0; 1400];
let addr = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 1);
sock.send_to(&data, &black_box(addr)).unwrap();
sock.send_to(&data, black_box(addr)).unwrap();
}
fn decode_ipv4() {