Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McNab <[email protected]>
  • Loading branch information
PoignardAzur and DJMcNab authored Sep 19, 2024
1 parent 9220226 commit d5e5dab
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion masonry/src/text/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ impl<'a> StringCursor<'a> {
}

/// Move cursor to previous codepoint boundary, if it exists.
/// Returns previous codepoint as usize offset.
/// Returns previous codepoint as usize offset, or `None` if this cursor was already at the first boundary.
pub(crate) fn prev(&mut self) -> Option<usize> {
let current_pos = self.pos();

Expand Down
4 changes: 0 additions & 4 deletions masonry/src/widget/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ impl Widget for Label {
}
LifeCycle::BuildFocusChain =>
{
#[cfg(FALSE)]
if !self.text_layout.text().links().is_empty() {
tracing::warn!("Links present in text, but not yet integrated");
}
}
_ => {}
}
Expand Down
6 changes: 1 addition & 5 deletions masonry/src/widget/prose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,7 @@ impl Widget for Prose {
ctx.request_layout();
}
LifeCycle::BuildFocusChain => {
// TODO: This is *definitely* empty
#[cfg(FALSE)]
if !self.text_layout.text().links().is_empty() {
tracing::warn!("Links present in text, but not yet integrated");
}
// When we add links to `Prose`, they will probably need to be handled here.
}
_ => {}
}
Expand Down

0 comments on commit d5e5dab

Please sign in to comment.