Skip to content

Commit 6a02453

Browse files
committed
---
yaml --- r: 114311 b: refs/heads/master c: ffe2686 h: refs/heads/master i: 114309: de4d5ce 114307: e01effe 114303: 7c3db05 v: v3
1 parent f38ed65 commit 6a02453

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f9695a6256a2473636d3e16b5347cddf592fd00d
2+
refs/heads/master: ffe268606370e67bc312d92ccad39546c7646fdc
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/src/libcollections/bitv.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,17 +486,13 @@ impl Bitv {
486486
!self.none()
487487
}
488488

489-
pub fn init_to_vec(&self, i: uint) -> uint {
490-
return if self.get(i) { 1 } else { 0 };
491-
}
492-
493489
/**
494490
* Converts `self` to a vector of `uint` with the same length.
495491
*
496492
* Each `uint` in the resulting vector has either value `0u` or `1u`.
497493
*/
498494
pub fn to_vec(&self) -> Vec<uint> {
499-
Vec::from_fn(self.nbits, |x| self.init_to_vec(x))
495+
Vec::from_fn(self.nbits, |i| if self.get(i) { 1 } else { 0 })
500496
}
501497

502498
/**

0 commit comments

Comments
 (0)