Clean up more clippy.

This commit is contained in:
Stephen Chung
2022-07-27 18:04:59 +08:00
parent 39dee556c4
commit 2f948a784c
47 changed files with 412 additions and 377 deletions

View File

@@ -147,10 +147,10 @@ impl fmt::Display for BreakPoint {
pos,
enabled,
} => {
if !source.is_empty() {
write!(f, "{} @ {:?}", source, pos)?;
} else {
if source.is_empty() {
write!(f, "@ {:?}", pos)?;
} else {
write!(f, "{} @ {:?}", source, pos)?;
}
if !*enabled {
f.write_str(" (disabled)")?;
@@ -201,6 +201,7 @@ impl fmt::Display for BreakPoint {
impl BreakPoint {
/// Is this [`BreakPoint`] enabled?
#[inline(always)]
#[must_use]
pub fn is_enabled(&self) -> bool {
match self {
#[cfg(not(feature = "no_position"))]