mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
replace deprecated uint references with u32
Replaced uint references with u32 to prevent compiler warnings.
This commit is contained in:
parent
2127e0d56d
commit
c989bd4ab7
@ -54,7 +54,7 @@ The other kind of looping construct in Rust is the `while` loop. It looks like
|
|||||||
this:
|
this:
|
||||||
|
|
||||||
```{rust}
|
```{rust}
|
||||||
let mut x = 5u; // mut x: uint
|
let mut x = 5u32; // mut x: u32
|
||||||
let mut done = false; // mut done: bool
|
let mut done = false; // mut done: bool
|
||||||
|
|
||||||
while !done {
|
while !done {
|
||||||
@ -91,7 +91,7 @@ can do with safety and code generation, so you should always prefer
|
|||||||
Let's take a look at that `while` loop we had earlier:
|
Let's take a look at that `while` loop we had earlier:
|
||||||
|
|
||||||
```{rust}
|
```{rust}
|
||||||
let mut x = 5u;
|
let mut x = 5u32;
|
||||||
let mut done = false;
|
let mut done = false;
|
||||||
|
|
||||||
while !done {
|
while !done {
|
||||||
@ -108,7 +108,7 @@ modifying iteration: `break` and `continue`.
|
|||||||
In this case, we can write the loop in a better way with `break`:
|
In this case, we can write the loop in a better way with `break`:
|
||||||
|
|
||||||
```{rust}
|
```{rust}
|
||||||
let mut x = 5u;
|
let mut x = 5u32;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
x += x - 3;
|
x += x - 3;
|
||||||
|
Loading…
Reference in New Issue
Block a user