Skip to content

Commit

Permalink
Simplify black_box (redundant cast)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Dec 17, 2016
1 parent 504a33b commit 94aa7fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ impl MetricMap {
/// elimination.
pub fn black_box<T>(dummy: T) -> T {
unsafe {
let ret = ptr::read_volatile(&dummy as *const T);
let ret = ptr::read_volatile(&dummy);
forget(dummy);
ret
}
Expand Down

0 comments on commit 94aa7fc

Please sign in to comment.