Skip to content

Commit 125ee92

Browse files
authored
chore(docs): fix typos in crate documentation (#1002)
1 parent 742a5ea commit 125ee92

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/widgets.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl<W: WidgetRef> WidgetRef for Option<W> {
355355
/// to a stateful widget and render it later. It also allows you to render boxed stateful widgets.
356356
///
357357
/// This trait was introduced in Ratatui 0.26.0 and is implemented for all the internal stateful
358-
/// widgets. Implemetors should prefer to implement this over the `StatefulWidget` trait and add an
358+
/// widgets. Implementors should prefer to implement this over the `StatefulWidget` trait and add an
359359
/// implementation of `StatefulWidget` that calls `StatefulWidgetRef::render_ref` where backwards
360360
/// compatibility is required.
361361
///

src/widgets/calendar.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//!
33
//!
44
//!
5-
//! The [`Monthly`] widget will display a calendar for the monh provided in `display_date`. Days are
6-
//! styled using the default style unless:
5+
//! The [`Monthly`] widget will display a calendar for the month provided in `display_date`. Days
6+
//! are styled using the default style unless:
77
//! * `show_surrounding` is set, then days not in the `display_date` month will use that style.
88
//! * a style is returned by the [`DateStyler`] for the day
99
//!

src/widgets/chart.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl<'a> Dataset<'a> {
330330

331331
/// Sets the data points of this dataset
332332
///
333-
/// Points will then either be rendered as scrattered points or with lines between them
333+
/// Points will then either be rendered as scattered points or with lines between them
334334
/// depending on [`Dataset::graph_type`].
335335
///
336336
/// Data consist in an array of `f64` tuples (`(f64, f64)`), the first element being X and the
@@ -493,7 +493,7 @@ pub struct Chart<'a> {
493493
style: Style,
494494
/// Constraints used to determine whether the legend should be shown or not
495495
hidden_legend_constraints: (Constraint, Constraint),
496-
/// The position detnermine where the legenth is shown or hide regaurdless of
496+
/// The position determine where the length is shown or hide regardless of
497497
/// `hidden_legend_constraints`
498498
legend_position: Option<LegendPosition>,
499499
}
@@ -636,7 +636,7 @@ impl<'a> Chart<'a> {
636636
/// let chart = Chart::new(vec![]).hidden_legend_constraints(constraints);
637637
/// ```
638638
///
639-
/// Always hide the legend. Note this can be accomplished more exclicitely by passing `None` to
639+
/// Always hide the legend. Note this can be accomplished more explicitly by passing `None` to
640640
/// [`Chart::legend_position`].
641641
///
642642
/// ```

src/widgets/list.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ impl<'a> List<'a> {
643643
/// - [`HighlightSpacing::Always`] will always allocate the spacing, regardless of whether an
644644
/// item is selected or not. This means that the table will never change size, regardless of
645645
/// if an item is selected or not.
646-
/// - [`HighlightSpacing::WhenSelected`] will only allocate the spacing if an itemis selected.
646+
/// - [`HighlightSpacing::WhenSelected`] will only allocate the spacing if an item is selected.
647647
/// This means that the table will shift when an item is selected. This is the default setting
648648
/// for backwards compatibility, but it is recommended to use `HighlightSpacing::Always` for a
649649
/// better user experience.
@@ -2127,9 +2127,9 @@ mod tests {
21272127
terminal.backend().assert_buffer(&expected);
21282128
}
21292129

2130-
/// If there isnt enough room for the selected item and the requested padding the list can jump
2131-
/// up and down every frame if something isnt done about it. This code tests to make sure that
2132-
/// isnt currently happening
2130+
/// If there isn't enough room for the selected item and the requested padding the list can jump
2131+
/// up and down every frame if something isn't done about it. This code tests to make sure that
2132+
/// isn't currently happening
21332133
#[test]
21342134
fn test_padding_flicker() {
21352135
let backend = backend::TestBackend::new(10, 5);

0 commit comments

Comments
 (0)