forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#59102 - newpavlov:duration_float, r=alexcri…
…chton Consistent naming for duration_float methods and additional f32 methods `duration_float` tracking issue: rust-lang#54361 New list of methods: - `as_secs_f64(&self) -> f64` - `as_secs_f32(&self) -> f32` - `from_secs_f64(secs: f64) -> Duration` - `from_secs_f32(secs: f32) -> Duration` - `mul_f64(self, rhs: f64) -> Duration` - `mul_f32(self, rhs: f32) -> Duration` - `div_f64(self, rhs: f64) -> Duration` - `div_f32(self, rhs: f64) -> Duration` - `div_duration_f64(self, rhs: Duration) -> f64` - `div_duration_f32(self, rhs: Duration) -> f32` With [`num_traits::Float`](https://docs.rs/num-traits/0.2.6/num_traits/float/trait.Float.html) we could've reduced number of methods by factor of two, but unfortunately it's not part of `std`.
- Loading branch information
Showing
1 changed file
with
129 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters