Skip to content

Commit 3420254

Browse files
graydonthestinger
authored andcommitted
---
yaml --- r: 49960 b: refs/heads/auto c: 0942c80 h: refs/heads/master v: v3
1 parent 312a02e commit 3420254

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 98900d55e7f08a4b4cb665152a01b0bbf655baae
17+
refs/heads/auto: 0942c802725b4c2816f2232304cdd14b3e44cd3f
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/src/libcore/trie.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ impl<T> TrieNode<T> {
272272
// if this was done via a trait, the key could be generic
273273
#[inline(always)]
274274
pure fn chunk(n: uint, idx: uint) -> uint {
275-
let real_idx = uint::bytes - 1 - idx;
276-
(n >> (SHIFT * real_idx)) & MASK
275+
let sh = uint::bits - (SHIFT * (idx + 1));
276+
(n >> sh) & MASK
277277
}
278278

279279
fn insert<T>(count: &mut uint, child: &mut Child<T>, key: uint, value: T,

0 commit comments

Comments
 (0)