Skip to content

Commit ae46e52

Browse files
committed
Add a comment explaining allow of wrong_self_convention
1 parent fb78cdc commit ae46e52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tracing-core/src/span.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ impl Id {
6868
Id(NonZeroU64::new(u).expect("span IDs must be > 0"))
6969
}
7070

71-
/// Returns the span's ID as a `u64`.
71+
// Allow `into` by-ref since we don't want to impl Copy for Id
7272
#[allow(clippy::wrong_self_convention)]
73+
/// Returns the span's ID as a `u64`.
7374
pub fn into_u64(&self) -> u64 {
7475
self.0.get()
7576
}

0 commit comments

Comments
 (0)