Skip to content

Commit f72f556

Browse files
docs: Missing backticks (linebender#900)
1 parent 88f453c commit f72f556

File tree

10 files changed

+23
-23
lines changed

10 files changed

+23
-23
lines changed

masonry/src/app/app_driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl DriverCtx<'_> {
4141
self.render_root
4242
}
4343

44-
/// Returns true if something happened that requires a rewrite pass or a re-render.
44+
/// Returns `true` if something happened that requires a rewrite pass or a re-render.
4545
pub fn content_changed(&self) -> bool {
4646
self.render_root.needs_rewrite_passes()
4747
}

masonry/src/core/event.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ impl PointerEvent {
405405
}
406406
}
407407

408-
/// Returns true if the event is likely to occur every frame.
408+
/// Returns `true` if the event is likely to occur every frame.
409409
///
410410
/// Developers should avoid logging during high-density events to avoid
411411
/// cluttering the console.
@@ -491,7 +491,7 @@ impl TextEvent {
491491
}
492492
}
493493

494-
/// Returns true if the event is likely to occur every frame.
494+
/// Returns `true` if the event is likely to occur every frame.
495495
///
496496
/// Developers should avoid logging during high-density events to avoid
497497
/// cluttering the console.

masonry/src/core/properties.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,29 @@ impl Properties {
5757
}
5858

5959
impl PropertiesRef<'_> {
60-
/// Returns true if the widget has a property of type `T`.
60+
/// Returns `true` if the widget has a property of type `T`.
6161
pub fn contains<T: 'static>(&self) -> bool {
6262
self.map.contains::<T>()
6363
}
6464

65-
/// Get value of property `T`, or None if the widget has no `T` property.
65+
/// Get value of property `T`, or `None` if the widget has no `T` property.
6666
pub fn get<T: 'static>(&self) -> Option<&T> {
6767
self.map.get::<T>()
6868
}
6969
}
7070

7171
impl PropertiesMut<'_> {
72-
/// Returns true if the widget has a property of type `T`.
72+
/// Returns `true` if the widget has a property of type `T`.
7373
pub fn contains<T: 'static>(&self) -> bool {
7474
self.map.contains::<T>()
7575
}
7676

77-
/// Get value of property `T`, or None if the widget has no `T` property.
77+
/// Get value of property `T`, or `None` if the widget has no `T` property.
7878
pub fn get<T: 'static>(&self) -> Option<&T> {
7979
self.map.get::<T>()
8080
}
8181

82-
/// Get value of property `T`, or None if the widget has no `T` property.
82+
/// Get value of property `T`, or `None` if the widget has no `T` property.
8383
///
8484
/// If you're using a `WidgetMut`, call [`WidgetMut::get_prop_mut`] instead.
8585
///

masonry/src/core/widget_mut.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ impl<W: Widget + ?Sized> WidgetMut<'_, W> {
5353
}
5454
}
5555

56-
/// Returns true if the widget has a property of type `T`.
56+
/// Returns `true` if the widget has a property of type `T`.
5757
pub fn get_prop<T: 'static>(&self) -> Option<&T> {
5858
self.ctx.properties.get::<T>()
5959
}
6060

61-
/// Get value of property `T`, or None if the widget has no `T` property.
61+
/// Get value of property `T`, or `None` if the widget has no `T` property.
6262
pub fn contains_prop<T: 'static>(&self) -> bool {
6363
self.ctx.properties.contains::<T>()
6464
}
6565

66-
/// Get value of property `T`, or None if the widget has no `T` property.
66+
/// Get value of property `T`, or `None` if the widget has no `T` property.
6767
pub fn get_prop_mut<T: 'static>(&mut self) -> Option<&mut T> {
6868
self.widget
6969
.property_changed(&mut self.ctx.update_mut(), TypeId::of::<T>());

masonry/src/core/widget_ref.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ impl<'w, W: Widget + ?Sized> WidgetRef<'w, W> {
8686
self.ctx.widget_state.id
8787
}
8888

89-
/// Returns true if the widget has a property of type `T`.
89+
/// Returns `true` if the widget has a property of type `T`.
9090
pub fn get_prop<T: 'static>(&self) -> Option<&T> {
9191
self.properties.get::<T>()
9292
}
9393

94-
/// Get value of property `T`, or None if the widget has no `T` property.
94+
/// Get value of property `T`, or `None` if the widget has no `T` property.
9595
pub fn contains_prop<T: 'static>(&self) -> bool {
9696
self.properties.contains::<T>()
9797
}

masonry/src/passes/update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::passes::{enter_span, enter_span_if, merge_state_up, recurse_on_childr
1919
// --- MARK: HELPERS ---
2020
/// Returns the id path starting from the given widget id and ending at the root.
2121
///
22-
/// If `widget_id` is None, returns an empty Vec.
22+
/// If `widget_id` is `None`, returns an empty `Vec`.
2323
fn get_id_path(root: &RenderRoot, widget_id: Option<WidgetId>) -> Vec<WidgetId> {
2424
let Some(widget_id) = widget_id else {
2525
return Vec::new();

masonry/src/widgets/split.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl<ChildA: Widget + ?Sized, ChildB: Widget + ?Sized> Split<ChildA, ChildB> {
200200
}
201201
}
202202

203-
/// Returns true if the provided mouse position is inside the splitter bar area.
203+
/// Returns `true` if the provided mouse position is inside the splitter bar area.
204204
fn bar_hit_test(&self, size: Size, mouse_pos: Point) -> bool {
205205
let (edge1, edge2) = self.bar_edges(size);
206206
match self.split_axis {

tree_arena/src/tree_arena_safe.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl<T> ArenaMut<'_, T> {
263263
}
264264

265265
impl<'arena, T> ArenaRefList<'arena, T> {
266-
/// Returns true if the list has an element with the given id.
266+
/// Returns `true` if the list has an element with the given id.
267267
pub fn has(self, id: impl Into<NodeId>) -> bool {
268268
let id = id.into();
269269
self.children.contains_key(&id)
@@ -321,7 +321,7 @@ impl<'arena, T> ArenaRefList<'arena, T> {
321321
}
322322

323323
impl<'arena, T> ArenaMutList<'arena, T> {
324-
/// Returns true if the list has an element with the given id.
324+
/// Returns `true` if the list has an element with the given id.
325325
pub fn has(self, id: impl Into<NodeId>) -> bool {
326326
let id = id.into();
327327
self.children.contains_key(&id)
@@ -409,7 +409,7 @@ impl<'arena, T> ArenaMutList<'arena, T> {
409409
/// Remove the item with the given id from the arena.
410410
///
411411
/// If the id isn't in the list (even if it's e.g. a descendant), does nothing
412-
/// and returns None.
412+
/// and returns `None`.
413413
///
414414
/// Else, returns the removed item.
415415
///

tree_arena/src/tree_arena_unsafe.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct TreeNode<T> {
1919
struct DataMap<T> {
2020
/// The items in the tree
2121
items: HashMap<NodeId, Box<UnsafeCell<TreeNode<T>>>>,
22-
/// The parent of each node, or None if it is the root
22+
/// The parent of each node, or `None` if it is the root
2323
parents: HashMap<NodeId, Option<NodeId>>,
2424
}
2525

@@ -315,7 +315,7 @@ impl<'arena, T> ArenaRefList<'arena, T> {
315315
}
316316
}
317317

318-
/// Returns true if the list has an element with the given id.
318+
/// Returns `true` if the list has an element with the given id.
319319
pub fn has(&self, id: impl Into<NodeId>) -> bool {
320320
let child_id = id.into();
321321
let parent_id = self.parent_id;
@@ -407,7 +407,7 @@ impl<'arena, T> ArenaMutList<'arena, T> {
407407
self.reborrow().is_descendant(id)
408408
}
409409

410-
/// Returns true if the list has an element with the given id.
410+
/// Returns `true` if the list has an element with the given id.
411411
pub fn has(&self, id: impl Into<NodeId>) -> bool {
412412
self.reborrow().has(id)
413413
}
@@ -506,7 +506,7 @@ impl<'arena, T> ArenaMutList<'arena, T> {
506506
/// Remove the item with the given id from the arena.
507507
///
508508
/// If the id isn't in the list (even if it's e.g. a descendant), does nothing
509-
/// and returns None.
509+
/// and returns `None`.
510510
///
511511
/// Else, returns the removed item.
512512
///

xilem_core/src/sequence.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ pub struct OptionSeqState<InnerState> {
205205
inner: Option<InnerState>,
206206
/// The generation this option is at.
207207
///
208-
/// If the inner sequence was Some, then None, then Some, the sequence
208+
/// If the inner sequence was `Some`, then `None`, then `Some`, the sequence
209209
/// is treated as a new sequence, as e.g. build has been called again.
210210
generation: u64,
211211
}

0 commit comments

Comments
 (0)