Skip to content

Commit

Permalink
fix method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed Dec 10, 2020
1 parent 092b393 commit 8031bab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BitwiseRotate/BitwiseRotate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public extension FixedWidthInteger where Self == UInt {
/// Shift the bits to the left. Shifted bits are rotated to the right.
/// - Parameter n: Number of places to shift.
/// - Returns: Bits rotated n places to the left.
func rotateLeft<Other>(_ n: Other) -> Self where Other : BinaryInteger {
func rotateLeft(_ n: Int) -> Self {
assert(n < 64)
if n == 0 { return self }
return (self &<< n) | (self &>> (64 &- Self(truncatingIfNeeded: n)))
Expand Down

0 comments on commit 8031bab

Please sign in to comment.