Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Commit

Permalink
fix the failing tests for 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelash committed Jul 23, 2016
1 parent 408b992 commit 59acfda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parsing/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ fn pack_as_u16s(atoms: &[usize]) -> Result<Scope, ParseScopeError> {
if n >= (u16::MAX as usize) - 2 {
return Err(ParseScopeError::TooManyAtoms);
}
let small = n + 1; // +1 since we reserve 0 for unused
let small = (n + 1) as u64; // +1 since we reserve 0 for unused

if i < 4 {
let shift = (3 - i) * 16;
res.a |= (small << shift) as u64;
res.a |= small << shift;
} else {
let shift = (7 - i) * 16;
res.b |= (small << shift) as u64;
res.b |= small << shift;
}
}
Ok(res)
Expand Down

0 comments on commit 59acfda

Please sign in to comment.