Apply suggestions from code review
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
parent
8316cecf69
commit
de7bcca6e4
1 changed files with 2 additions and 2 deletions
|
@ -328,13 +328,13 @@ impl<'tcx, Tag> Scalar<Tag> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_f32(f: Single) -> Self {
|
pub fn from_f32(f: Single) -> Self {
|
||||||
// We trust apfloat to give us properly truncated data
|
// We trust apfloat to give us properly truncated data.
|
||||||
Scalar::Raw { data: f.to_bits(), size: 4 }
|
Scalar::Raw { data: f.to_bits(), size: 4 }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_f64(f: Double) -> Self {
|
pub fn from_f64(f: Double) -> Self {
|
||||||
// We trust apfloat to give us properly truncated data
|
// We trust apfloat to give us properly truncated data.
|
||||||
Scalar::Raw { data: f.to_bits(), size: 8 }
|
Scalar::Raw { data: f.to_bits(), size: 8 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue