Update char-bool.md

`std::mem::size_of_val(&x))` can be simplified to `std::mem::`
pull/1482/head
Corning Sun 1 week ago committed by GitHub
parent ff9e90d15d
commit 16b50cd1dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,7 +24,7 @@ fn main() {
```rust ```rust
fn main() { fn main() {
let x = '中'; let x = '中';
println!("字符'中'占用了{}字节的内存大小",std::mem::size_of_val(&x)); println!("字符'中'占用了{}字节的内存大小", size_of_val(&x));
} }
``` ```

Loading…
Cancel
Save