3535//!
3636//! ```
3737//! use std::sync::Arc;
38- //! use std::thread::Thread ;
38+ //! use std::thread;
3939//!
4040//! let five = Arc::new(5);
4141//!
4242//! for _ in 0..10 {
4343//! let five = five.clone();
4444//!
45- //! Thread ::spawn(move || {
45+ //! thread ::spawn(move || {
4646//! println!("{:?}", five);
4747//! });
4848//! }
5252//!
5353//! ```
5454//! use std::sync::{Arc, Mutex};
55- //! use std::thread::Thread ;
55+ //! use std::thread;
5656//!
5757//! let five = Arc::new(Mutex::new(5));
5858//!
5959//! for _ in 0..10 {
6060//! let five = five.clone();
6161//!
62- //! Thread ::spawn(move || {
62+ //! thread ::spawn(move || {
6363//! let mut number = five.lock().unwrap();
6464//!
6565//! *number += 1;
@@ -95,7 +95,7 @@ use heap::deallocate;
9595///
9696/// ```rust
9797/// use std::sync::Arc;
98- /// use std::thread::Thread ;
98+ /// use std::thread;
9999///
100100/// fn main() {
101101/// let numbers: Vec<_> = (0..100u32).map(|i| i as f32).collect();
@@ -104,7 +104,7 @@ use heap::deallocate;
104104/// for _ in 0..10 {
105105/// let child_numbers = shared_numbers.clone();
106106///
107- /// Thread ::spawn(move || {
107+ /// thread ::spawn(move || {
108108/// let local_numbers = child_numbers.as_slice();
109109///
110110/// // Work with the local numbers
@@ -621,7 +621,7 @@ mod tests {
621621 use std:: option:: Option :: { Some , None } ;
622622 use std:: sync:: atomic;
623623 use std:: sync:: atomic:: Ordering :: { Acquire , SeqCst } ;
624- use std:: thread:: Thread ;
624+ use std:: thread;
625625 use std:: vec:: Vec ;
626626 use super :: { Arc , Weak , weak_count, strong_count} ;
627627 use std:: sync:: Mutex ;
@@ -648,7 +648,7 @@ mod tests {
648648
649649 let ( tx, rx) = channel ( ) ;
650650
651- let _t = Thread :: spawn ( move || {
651+ let _t = thread :: spawn ( move || {
652652 let arc_v: Arc < Vec < i32 > > = rx. recv ( ) . unwrap ( ) ;
653653 assert_eq ! ( ( * arc_v) [ 3 ] , 4 ) ;
654654 } ) ;
0 commit comments