Skip to content

Commit b55aa0b

Browse files
committed
Simplify
1 parent 62bf352 commit b55aa0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rules/font_face.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,12 @@ impl ToCss for UnicodeRange {
283283

284284
// Get the remainder of the value. This must be 0x0 to 0xf for the rest
285285
// of the value to use the question mark syntax.
286-
let remainder_mask = (0xf << shift) - 1 | (1 << shift);
286+
shift += 4;
287+
let remainder_mask = (1 << shift) - 1;
287288
let start_remainder = self.start & remainder_mask;
288289
let end_remainder = self.end & remainder_mask;
289290

290291
if start_remainder == 0 && end_remainder == remainder_mask {
291-
shift += 4;
292292
let start = (self.start & !remainder_mask) >> shift;
293293
if start != 0 {
294294
write!(dest, "U+{:X}", start)?;

0 commit comments

Comments
 (0)