mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 23:37:32 +00:00
Do not print hash in debug builds
This commit is contained in:
parent
6febd2b582
commit
1bbcfe2261
1 changed files with 5 additions and 2 deletions
|
@ -47,8 +47,11 @@ impl Id {
|
||||||
impl Debug for Id {
|
impl Debug for Id {
|
||||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
write!(f, "{:?} ", self.name)?;
|
write!(f, "{}", self.name)?;
|
||||||
write!(f, "[hash: {}]", self.id)
|
#[cfg(not(debug_assertions))]
|
||||||
|
write!(f, "[hash: {}]", self.id)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue