Skip to content

Commit 480ea5a

Browse files
committed
Update core::cell for isize/usize transition.
1 parent a97588c commit 480ea5a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/libcore/cell.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@
7878
//! use std::cell::RefCell;
7979
//!
8080
//! struct Graph {
81-
//! edges: Vec<(uint, uint)>,
82-
//! span_tree_cache: RefCell<Option<Vec<(uint, uint)>>>
81+
//! edges: Vec<(i32, i32)>,
82+
//! span_tree_cache: RefCell<Option<Vec<(i32, i32)>>>
8383
//! }
8484
//!
8585
//! impl Graph {
86-
//! fn minimum_spanning_tree(&self) -> Vec<(uint, uint)> {
86+
//! fn minimum_spanning_tree(&self) -> Vec<(i32, i32)> {
8787
//! // Create a new scope to contain the lifetime of the
8888
//! // dynamic borrow
8989
//! {
@@ -104,7 +104,7 @@
104104
//! // This is the major hazard of using `RefCell`.
105105
//! self.minimum_spanning_tree()
106106
//! }
107-
//! # fn calc_span_tree(&self) -> Vec<(uint, uint)> { vec![] }
107+
//! # fn calc_span_tree(&self) -> Vec<(i32, i32)> { vec![] }
108108
//! }
109109
//! ```
110110
//!
@@ -125,7 +125,7 @@
125125
//!
126126
//! struct RcBox<T> {
127127
//! value: T,
128-
//! refcount: Cell<uint>
128+
//! refcount: Cell<usize>
129129
//! }
130130
//!
131131
//! impl<T> Clone for Rc<T> {
@@ -279,8 +279,8 @@ pub enum BorrowState {
279279
}
280280

281281
// Values [1, MAX-1] represent the number of `Ref` active
282-
// (will not outgrow its range since `uint` is the size of the address space)
283-
type BorrowFlag = uint;
282+
// (will not outgrow its range since `usize` is the size of the address space)
283+
type BorrowFlag = usize;
284284
const UNUSED: BorrowFlag = 0;
285285
const WRITING: BorrowFlag = -1;
286286

0 commit comments

Comments
 (0)