From 50206f172958eaa5fb69e61d953698bb1c6cd246 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 16 Feb 2024 16:15:15 +0100 Subject: [PATCH] fmt --- members/revsqrt/tests/basic-revsqrt.rs | 22 ++-------------------- members/revsqrt/tests/revsqrt.rs | 3 --- members/tokio-send-sync/src/main.rs | 2 +- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/members/revsqrt/tests/basic-revsqrt.rs b/members/revsqrt/tests/basic-revsqrt.rs index 6226282..a907483 100644 --- a/members/revsqrt/tests/basic-revsqrt.rs +++ b/members/revsqrt/tests/basic-revsqrt.rs @@ -1,9 +1,5 @@ use std::iter::zip; - - - - // is n about the same as m? // This is actually not so easy! How do you measure "about same"ness? // Also, it is not transitive, as 1 ≈ 1.1 ≈ 1.2 ≈ 1.3 ≈ ... ≈ 2 ≈ ... ≈ 3 ≈ ... ≈ infinity, that's @@ -35,14 +31,7 @@ fn test_calc_regular_rsqrt() { #[test] fn test_calc_specific_fast_rsqrt() { let params: &[f32] = &[1.0, 1.1, 100.0, 1337.0, 123.456_79, 1337.1337]; - let results: &[f32] = &[ - 1.0, - 0.953_462_6, - 0.1, - 0.027_348_55, - 0.09, - 0.027_347_183, - ]; + let results: &[f32] = &[1.0, 0.953_462_6, 0.1, 0.027_348_55, 0.09, 0.027_347_183]; for (n, m) in zip(params, results) { assert!(about_same(revsqrt::fast_inverse_sqrt(*n), *m)) } @@ -51,14 +40,7 @@ fn test_calc_specific_fast_rsqrt() { #[test] fn test_calc_specific_reqular_rsqrt() { let params: &[f32] = &[1.0, 1.1, 100.0, 1337.0, 123.456_79, 1337.1337]; - let results: &[f32] = &[ - 1.0, - 0.953_462_6, - 0.1, - 0.027_348_55, - 0.09, - 0.027_347_183, - ]; + let results: &[f32] = &[1.0, 0.953_462_6, 0.1, 0.027_348_55, 0.09, 0.027_347_183]; for (n, m) in zip(params, results) { assert_eq!(revsqrt::regular_inverse_sqrt(*n), *m) } diff --git a/members/revsqrt/tests/revsqrt.rs b/members/revsqrt/tests/revsqrt.rs index 6e96167..d9a67db 100644 --- a/members/revsqrt/tests/revsqrt.rs +++ b/members/revsqrt/tests/revsqrt.rs @@ -1,10 +1,7 @@ use std::iter::zip; - - use cucumber::{gherkin::Step, given, then, when, World}; - /// stores the current information for each scenario #[derive(Debug, Default, World)] struct NumWorld { diff --git a/members/tokio-send-sync/src/main.rs b/members/tokio-send-sync/src/main.rs index e568a62..ba0b009 100644 --- a/members/tokio-send-sync/src/main.rs +++ b/members/tokio-send-sync/src/main.rs @@ -1,4 +1,4 @@ -use std::{ sync::Arc}; +use std::sync::Arc; use tokio::{net::TcpListener, sync::Mutex};