Mark debug functions cold.

This commit is contained in:
Stephen Chung
2022-09-27 08:52:39 +08:00
parent 20d4b71591
commit 25476d1cea
16 changed files with 42 additions and 7 deletions

View File

@@ -47,6 +47,8 @@ pub struct StepRange<T: Debug + Copy + PartialOrd> {
}
impl<T: Debug + Copy + PartialOrd> Debug for StepRange<T> {
#[cold]
#[inline(never)]
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_tuple(&format!("StepRange<{}>", type_name::<T>()))
.field(&self.from)