Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • stephen/minipac
1 result
Show changes
Commits on Source (4)
Copyright © 2022 scd31.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
......@@ -141,8 +141,7 @@ impl PacketData {
buf.extend(
frame_ids
.iter()
.map(|frame_id| u16_to_u8s(*frame_id))
.flatten()
.flat_map(|frame_id| u16_to_u8s(*frame_id))
.collect::<Vec<_>>(),
);
}
......
......@@ -323,8 +323,7 @@ impl ConnectionState {
// No missing frames. Reconstruct data and send to handler
let compressed: Vec<u8> = chunks
.iter()
.map(|c| c.as_ref().unwrap())
.flatten()
.flat_map(|c| c.as_ref().unwrap())
.cloned()
.collect();
......
......@@ -234,7 +234,7 @@ fn can_establish_connection_and_transfer_data_many_packets() {
)
.unwrap();
let data: Vec<u8> = (0..(100_000)).map(|_| rand::random()).collect();
let data: Vec<u8> = (0..100_000).map(|_| rand::random()).collect();
// echo server
{
......@@ -334,7 +334,7 @@ fn multiple_actions_in_quick_succession() {
)
.unwrap();
let data: Vec<u8> = (0..(100_000)).map(|_| rand::random()).collect();
let data: Vec<u8> = (0..100_000).map(|_| rand::random()).collect();
// echo server
{
......@@ -377,8 +377,8 @@ fn multiple_actions_in_quick_succession() {
#[test]
fn two_connections_one_client() {
let data1: Vec<u8> = (0..(1_000)).map(|_| rand::random()).collect();
let data2: Vec<u8> = (0..(1_000)).map(|_| rand::random()).collect();
let data1: Vec<u8> = (0..1_000).map(|_| rand::random()).collect();
let data2: Vec<u8> = (0..1_000).map(|_| rand::random()).collect();
let server1 = Server::new(
"localhost:8010",
......