Skip to content

Commit 1209946

Browse files
authored
Fix Clippy as_underscore lint (#219)
1 parent e0d8ce9 commit 1209946

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/byteorder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,12 @@ mod tests {
538538
macro_rules! impl_traits {
539539
($name:ident, $native:ident, $bytes:expr, $sign:ident) => {
540540
impl Native for $native {
541-
// For some types, `0 as _` is required (for example, when
541+
// For some types, `0 as $native` is required (for example, when
542542
// `$native` is a floating-point type; `0` is an integer), but
543543
// for other types, it's a trivial cast. In all cases, Clippy
544544
// thinks it's dangerous.
545545
#[allow(trivial_numeric_casts, clippy::as_conversions)]
546-
const ZERO: $native = 0 as _;
546+
const ZERO: $native = 0 as $native;
547547
const MAX_VALUE: $native = $native::MAX;
548548

549549
fn rand() -> $native {

0 commit comments

Comments
 (0)