Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 7862895

Browse files
author
Peter Michael Green
committed
Apply formatting fixes from CI
1 parent d20af36 commit 7862895

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

libm/src/math/j1f.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,10 @@ mod tests {
371371
fn test_y1f_2002() {
372372
//allow slightly different result on x87
373373
let res = y1f(2.0000002_f32);
374-
if cfg!(all(target_arch = "x86", not(target_feature = "sse2"))) && (res == -0.10703231_f32) { return };
374+
if cfg!(all(target_arch = "x86", not(target_feature = "sse2"))) && (res == -0.10703231_f32)
375+
{
376+
return;
377+
}
375378
assert_eq!(res, -0.10703229_f32);
376379
}
377380
}

libm/src/math/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
macro_rules! force_eval {
22
($e:expr) => {
3-
unsafe {
4-
::core::ptr::read_volatile(&$e)
5-
}
3+
unsafe { ::core::ptr::read_volatile(&$e) }
64
};
75
}
86

libm/src/math/sincos.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ mod tests {
6969
fn with_pi() {
7070
let (s, c) = sincos(core::f64::consts::PI);
7171
assert!(
72-
(s - 0.0).abs() < TOLERANCE,
73-
"|{} - {}| = {} >= {}",
74-
s,
75-
0.0,
76-
(s - 0.0).abs(),
77-
TOLERANCE
78-
);
72+
(s - 0.0).abs() < TOLERANCE,
73+
"|{} - {}| = {} >= {}",
74+
s,
75+
0.0,
76+
(s - 0.0).abs(),
77+
TOLERANCE
78+
);
7979
assert!(
80-
(c + 1.0).abs() < TOLERANCE,
81-
"|{} + {}| = {} >= {}",
82-
c,
83-
1.0,
84-
(s + 1.0).abs(),
85-
TOLERANCE
86-
);
80+
(c + 1.0).abs() < TOLERANCE,
81+
"|{} + {}| = {} >= {}",
82+
c,
83+
1.0,
84+
(s + 1.0).abs(),
85+
TOLERANCE
86+
);
8787
}
8888

8989
#[test]

0 commit comments

Comments
 (0)