about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbendn <bend.n@outlook.com>2025-03-31 15:50:56 +0700
committerbendn <bend.n@outlook.com>2025-04-24 13:14:36 +0700
commit338e7388ea078c8bf70600f0755701b490ec267b (patch)
treea6f1d6ba9a0fe462fec7daed26e7d524cdbfc35f
parentccbcbee5e77a8ee073f23894ef550c6ea9f759c3 (diff)
downloadrust-338e7388ea078c8bf70600f0755701b490ec267b.tar.gz
rust-338e7388ea078c8bf70600f0755701b490ec267b.zip
Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etc
-rw-r--r--example/example.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/example/example.rs b/example/example.rs
index 03470b74d0a..888fa89201e 100644
--- a/example/example.rs
+++ b/example/example.rs
@@ -1,6 +1,6 @@
 #![feature(no_core, unboxed_closures)]
 #![no_core]
-#![allow(dead_code)]
+#![allow(dead_code, unnecessary_transmutes)]
 
 extern crate mini_core;
 
@@ -11,11 +11,7 @@ fn abc(a: u8) -> u8 {
 }
 
 fn bcd(b: bool, a: u8) -> u8 {
-    if b {
-        a * 2
-    } else {
-        a * 3
-    }
+    if b { a * 2 } else { a * 3 }
 }
 
 fn call() {