mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Fix unused imports in the tutorials
This commit is contained in:
@@ -1611,7 +1611,6 @@ The following are examples of structure expressions:
|
||||
# struct Point { x: float, y: float }
|
||||
# struct TuplePoint(float, float);
|
||||
# mod game { pub struct User { name: &str, age: uint, score: uint } }
|
||||
# use game;
|
||||
Point {x: 10f, y: 20f};
|
||||
TuplePoint(10f, 20f);
|
||||
let u = game::User {name: "Joe", age: 35u, score: 100_000};
|
||||
|
||||
@@ -468,7 +468,6 @@ Here is the function that implements the child task:
|
||||
|
||||
~~~~
|
||||
# use std::comm::DuplexStream;
|
||||
# use comm::{Port, Chan};
|
||||
fn stringifier(channel: &DuplexStream<~str, uint>) {
|
||||
let mut value: uint;
|
||||
loop {
|
||||
@@ -491,7 +490,6 @@ Here is the code for the parent task:
|
||||
|
||||
~~~~
|
||||
# use std::comm::DuplexStream;
|
||||
# use comm::{Port, Chan};
|
||||
# use task::spawn;
|
||||
# fn stringifier(channel: &DuplexStream<~str, uint>) {
|
||||
# let mut value: uint;
|
||||
|
||||
@@ -2270,7 +2270,9 @@ fn chicken_farmer() {
|
||||
// The same, but name it `my_chicken`
|
||||
use my_chicken = farm::chicken;
|
||||
...
|
||||
# my_chicken();
|
||||
}
|
||||
# chicken();
|
||||
# }
|
||||
~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user