Skip to content

Commit

Permalink
Auto merge of rust-lang#125499 - matthiaskrgr:rollup-84i5z5w, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#125455 (Make `clamp` inline)
 - rust-lang#125477 (Run rustfmt on files that need it.)
 - rust-lang#125481 (Fix the dead link in the bootstrap README)
 - rust-lang#125482 (Notify kobzol after changes to `opt-dist`)
 - rust-lang#125489 (Revert problematic opaque type change)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed May 24, 2024
2 parents 5af5f81 + 50f0fa2 commit 88f0106
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
/// assert_eq!(2.clamp(-2, 1), 1);
/// ```
#[must_use]
#[inline]
#[stable(feature = "clamp", since = "1.50.0")]
fn clamp(self, min: Self, max: Self) -> Self
where
Expand Down
2 changes: 1 addition & 1 deletion test/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn fmt_thousands_sep(mut n: f64, sep: char) -> String {
(0, true) => write!(output, "{:06.2}", n / base as f64).unwrap(),
(0, false) => write!(output, "{:.2}", n / base as f64).unwrap(),
(_, true) => write!(output, "{:03}", n as usize / base).unwrap(),
_ => write!(output, "{}", n as usize / base).unwrap()
_ => write!(output, "{}", n as usize / base).unwrap(),
}
if pow != 0 {
output.push(sep);
Expand Down

0 comments on commit 88f0106

Please sign in to comment.