Skip to content

Commit 338e738

Browse files
committed
Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etc
1 parent ccbcbee commit 338e738

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

example/example.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(no_core, unboxed_closures)]
22
#![no_core]
3-
#![allow(dead_code)]
3+
#![allow(dead_code, unnecessary_transmutes)]
44

55
extern crate mini_core;
66

@@ -11,11 +11,7 @@ fn abc(a: u8) -> u8 {
1111
}
1212

1313
fn bcd(b: bool, a: u8) -> u8 {
14-
if b {
15-
a * 2
16-
} else {
17-
a * 3
18-
}
14+
if b { a * 2 } else { a * 3 }
1915
}
2016

2117
fn call() {

0 commit comments

Comments
 (0)