summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-08 15:31:15 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-08 16:37:07 +0100
commit12a59963b08b68cc39dcded4d3d3e6a6631c2732 (patch)
tree3d20b014ada1ac06d2e74611a1798d7fb18dca33 /src/util
parenta7a4cae2948176119e8995bd8e1868f2d0e65029 (diff)
Reduce style chain bloat
Diffstat (limited to 'src/util')
-rw-r--r--src/util/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/mod.rs b/src/util/mod.rs
index c6809d23..0b681223 100644
--- a/src/util/mod.rs
+++ b/src/util/mod.rs
@@ -161,9 +161,13 @@ impl ReadableTypeId {
impl Debug for ReadableTypeId {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
#[cfg(debug_assertions)]
- f.pad(self.name)?;
+ if let Some(part) = self.name.split("::").last() {
+ f.pad(part)?;
+ }
+
#[cfg(not(debug_assertions))]
f.pad("ReadableTypeId")?;
+
Ok(())
}
}