1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-25 17:21:45 +02:00

Wrap comments at 80 columns (#592)

When teaching the class, I notice that these comments (which are
wrapped at 100 columns) cause a horizontal scrollbar which makes them
hard to read at a glance.

Here I wrapped them at 80 columns, which fits on the screen and which
avoids overly long lines.
This commit is contained in:
Martin Geisler 2023-05-03 12:00:58 +02:00 committed by GitHub
parent 4a09d053ac
commit 789abc1028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,9 +9,10 @@ fn main() {
let r1 = &mut num as *mut i32;
let r2 = r1 as *const i32;
// Safe because r1 and r2 were obtained from references and so are guaranteed to be non-null and
// properly aligned, the objects underlying the references from which they were obtained are
// live throughout the whole unsafe block, and they are not accessed either through the
// Safe because r1 and r2 were obtained from references and so are
// guaranteed to be non-null and properly aligned, the objects underlying
// the references from which they were obtained are live throughout the
// whole unsafe block, and they are not accessed either through the
// references or concurrently through any other pointers.
unsafe {
println!("r1 is: {}", *r1);