Skip to content

Commit 1d26a0f

Browse files
committed
Remove FRepr
1 parent 15c9a68 commit 1d26a0f

File tree

2 files changed

+5
-32
lines changed

2 files changed

+5
-32
lines changed

src/float/mod.rs

-27
Original file line numberDiff line numberDiff line change
@@ -135,30 +135,3 @@ impl Float for f64 {
135135
(1i32.wrapping_sub(shift as i32), significand << shift as Self::Int)
136136
}
137137
}
138-
139-
// TODO: Move this to F32/F64 in qc.rs
140-
#[cfg(test)]
141-
#[derive(Copy, Clone)]
142-
pub struct FRepr<F>(F);
143-
144-
#[cfg(test)]
145-
impl<F: Float> PartialEq for FRepr<F> {
146-
fn eq(&self, other: &FRepr<F>) -> bool {
147-
// NOTE(cfg) for some reason, on hard float targets, our implementation doesn't
148-
// match the output of its gcc_s counterpart. Until we investigate further, we'll
149-
// just avoid testing against gcc_s on those targets. Do note that our
150-
// implementation matches the output of the FPU instruction on *hard* float targets
151-
// and matches its gcc_s counterpart on *soft* float targets.
152-
if cfg!(gnueabihf) {
153-
return true
154-
}
155-
self.0.eq_repr(other.0)
156-
}
157-
}
158-
159-
#[cfg(test)]
160-
impl<F: fmt::Debug> fmt::Debug for FRepr<F> {
161-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
162-
self.0.fmt(f)
163-
}
164-
}

src/float/pow.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ pow!(__powidf2: f64, i32);
3131

3232
#[cfg(test)]
3333
mod tests {
34-
use float::{Float, FRepr};
34+
use float::{Float};
3535
use qc::{I32, U32, U64};
3636

3737
check! {
3838
fn __powisf2(f: extern fn(f32, i32) -> f32,
3939
a: U32,
40-
b: I32) -> Option<FRepr<f32> > {
40+
b: I32) -> Option<F32> {
4141
let (a, b) = (f32::from_repr(a.0), b.0);
42-
Some(FRepr(f(a, b)))
42+
Some(F32(f(a, b)))
4343
}
4444

4545
fn __powidf2(f: extern fn(f64, i32) -> f64,
4646
a: U64,
47-
b: I32) -> Option<FRepr<f64> > {
47+
b: I32) -> Option<F64> {
4848
let (a, b) = (f64::from_repr(a.0), b.0);
49-
Some(FRepr(f(a, b)))
49+
Some(F64(f(a, b)))
5050
}
5151
}
5252
}

0 commit comments

Comments
 (0)