Skip to content

Commit ab05a46

Browse files
committed
---
yaml --- r: 210298 b: refs/heads/try c: 31e3cb7 h: refs/heads/master v: v3
1 parent a89d907 commit ab05a46

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 135502ef0016fd6b17324cc1ed4e088863a97176
5+
refs/heads/try: 31e3cb7c4e8895fff23aa67e1cd6b58d798cdac4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/libcollections/bit.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,13 @@ impl BitVec {
210210
assert_eq!(self.len(), other.len());
211211
// This could theoretically be a `debug_assert!`.
212212
assert_eq!(self.storage.len(), other.storage.len());
213-
let mut changed = false;
213+
let mut changed_bits = 0;
214214
for (a, b) in self.blocks_mut().zip(other.blocks()) {
215215
let w = op(*a, b);
216-
if *a != w {
217-
changed = true;
218-
*a = w;
219-
}
216+
changed_bits |= *a ^ w;
217+
*a = w;
220218
}
221-
changed
219+
changed_bits != 0
222220
}
223221

224222
/// Iterator over mutable refs to the underlying blocks of data.

0 commit comments

Comments
 (0)