Skip to content

Commit 57e8921

Browse files
committed
fix lint
1 parent 1cf0ec5 commit 57e8921

3 files changed

Lines changed: 20 additions & 15 deletions

File tree

rio-backend/src/crosswords/mod.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,17 +1543,13 @@ impl<U: EventListener> Crosswords<U> {
15431543
} else {
15441544
Column(0)
15451545
};
1546-
let end_col = if line == end.row {
1547-
end.col
1548-
} else {
1549-
last_col
1550-
};
1546+
let end_col = if line == end.row { end.col } else { last_col };
15511547

15521548
// Carry buffered blank cells across wrap continuations only.
15531549
// Without this, `aaa \n aaa"` (where row N wraps into N+1) would
15541550
// collapse the cross-row gap from two spaces to one.
1555-
let is_wrap_continuation = line.0 > start.row.0
1556-
&& self.grid[line - 1i32][last_col].wrapline();
1551+
let is_wrap_continuation =
1552+
line.0 > start.row.0 && self.grid[line - 1i32][last_col].wrapline();
15571553
if !is_wrap_continuation {
15581554
blank_cells = 0;
15591555
}
@@ -1604,7 +1600,13 @@ impl<U: EventListener> Crosswords<U> {
16041600
let line_length = std::cmp::min(self.grid[line].line_length(), cols.end + 1);
16051601
let cols_end = cols.end;
16061602

1607-
self.append_cells(&mut text, line, cols, include_wrapped_wide, &mut blank_cells);
1603+
self.append_cells(
1604+
&mut text,
1605+
line,
1606+
cols,
1607+
include_wrapped_wide,
1608+
&mut blank_cells,
1609+
);
16081610
// Trailing blank_cells intentionally dropped.
16091611

16101612
if cols_end >= self.grid.columns() - 1
@@ -1621,6 +1623,7 @@ impl<U: EventListener> Crosswords<U> {
16211623
/// - `\0` cells inside a run of content become real spaces
16221624
/// - trailing blanks at end of the run are dropped (caller decides
16231625
/// whether to flush them via the `blank_cells` accumulator)
1626+
///
16241627
/// Returns true if the line emitted any non-blank content.
16251628
fn append_cells(
16261629
&self,

sugarloaf/src/font/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub const FONT_CASCADIAMONO_SEMI_LIGHT_ITALIC: &[u8] =
5858
font!("./resources/CascadiaCode/CascadiaCode-SemiLightItalic.otf");
5959

6060
// pub const FONT_SYMBOLS_NERD_FONT_MONO: &[u8] =
61-
// font!("./resources/SymbolsNerdFontMono/SymbolsNerdFontMono-Regular.ttf");
61+
// font!("./resources/SymbolsNerdFontMono/SymbolsNerdFontMono-Regular.ttf");
6262

6363
// macOS gets system Apple Color Emoji through the font fallback chain (see
6464
// `fallbacks::external_fallbacks`) and doesn't need the bundled Twemoji —

sugarloaf/src/font/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,9 +1592,10 @@ mod postscript_resolver_tests {
15921592
fn insert_populates_postscript_lookup() {
15931593
// Read the PS name straight from the handle so the test doesn't
15941594
// hardcode a value that changes if the bundled font is updated.
1595-
let handle =
1596-
crate::font::macos::FontHandle::from_static_bytes(FONT_CASCADIAMONO_NF_REGULAR)
1597-
.expect("parse CascadiaMono");
1595+
let handle = crate::font::macos::FontHandle::from_static_bytes(
1596+
FONT_CASCADIAMONO_NF_REGULAR,
1597+
)
1598+
.expect("parse CascadiaMono");
15981599
let ps_name = handle.postscript_name();
15991600

16001601
let mut lib = FontLibraryData::default();
@@ -1621,9 +1622,10 @@ mod postscript_resolver_tests {
16211622
/// id, so first-wins is the correct policy.
16221623
#[test]
16231624
fn duplicate_insert_keeps_first_id() {
1624-
let handle =
1625-
crate::font::macos::FontHandle::from_static_bytes(FONT_CASCADIAMONO_NF_REGULAR)
1626-
.expect("parse CascadiaMono");
1625+
let handle = crate::font::macos::FontHandle::from_static_bytes(
1626+
FONT_CASCADIAMONO_NF_REGULAR,
1627+
)
1628+
.expect("parse CascadiaMono");
16271629
let ps_name = handle.postscript_name();
16281630

16291631
let mut lib = FontLibraryData::default();

0 commit comments

Comments
 (0)