Skip to content

Commit

Permalink
fix typos (#405)
Browse files Browse the repository at this point in the history
note:
- test name change
- function name change

here are a few typos to keep in mind:
- nessary -> necessary
- alignemnt -> alignment
- embeded -> embedded
- `full` joined to another root syllable, drop one `l` (usefull -> useful)
  • Loading branch information
Alexdelia authored Jun 12, 2024
1 parent c7a4cb4 commit e87ce94
Show file tree
Hide file tree
Showing 44 changed files with 118 additions and 118 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

# Changed

- Move `Style` to const implementation (it invloved changes to `Border`/`BorderColor` and more related subjects).
- Move `Style` to const implementation (it involved changes to `Border`/`BorderColor` and more related subjects).
- Added a basic implementation for a render.
- Added a new `Style` (by [@Brijeshkrishna](https://github.com/Brijeshkrishna)).
- Refactored a `Builder` methods (by [@CouldBeFree](https://github.com/CouldBeFree))
Expand Down Expand Up @@ -113,7 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Created `static_table` a macro to build tables at compile time.
- Created `ron_to_table` format convertion library.
- Created `ron_to_table` format conversion library.
- Added `IterTable` a table with a different backend logic.
- Added `CompactTable` a table with a different backend logic.
- Added `PoolTable` a table with a different backend logic.
Expand All @@ -131,7 +131,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Made a list of changes to `tabled` interface.
- Made a list of changes to `papergrid` interface.
- Made a list of changes to `json_to_table` interface.
- Comparision benchmarks were moved to the `master` branch.
- Comparison benchmarks were moved to the `master` branch.

### Fixed

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ you can find more examples in an **[examples](/tabled/examples/)** folder.
To print a list of structs or enums as a table, there is 2 ways.

* Using a builder method, to build table step by step
* Implement a `Tabled` trait for your type (or anotate your type with a derive macro) and use a iterator of this type.
* Implement a `Tabled` trait for your type (or annotate your type with a derive macro) and use a iterator of this type.

A builder method gets handy, when a data schema is unknown,\
while a typed struct in cases where we know the data structure beforehand.
Expand Down Expand Up @@ -927,7 +927,7 @@ use tabled::settings::{Width, object::Rows};
// in a first row.
table.modify(Rows::first().with(Width::wrap(10)));

// Use a strategy where we try to keep words not splited (where possible).
// Use a strategy where we try not to keep words split (where possible).
table.modify(Rows::new(1..).with(Width::wrap(10).keep_words()));
```

Expand Down Expand Up @@ -1098,7 +1098,7 @@ Imagine you have a table already which output may look like this.

```text
┌────┬──────────────┬───────────────────────────┐
│ id │ destribution │ link │
│ id │ distribution │ link │
├────┼──────────────┼───────────────────────────┤
│ 0 │ Fedora │ https://getfedora.org/ │
├────┼──────────────┼───────────────────────────┤
Expand All @@ -1120,7 +1120,7 @@ table.with(Rotate::Left);
┌──────────────┬────────────────────────┬───────────────────────────┬──────────────────────────┐
│ link │ https://getfedora.org/ │ https://www.opensuse.org/ │ https://endeavouros.com/ │
├──────────────┼────────────────────────┼───────────────────────────┼──────────────────────────┤
destribution │ Fedora │ OpenSUSE │ Endeavouros │
distribution │ Fedora │ OpenSUSE │ Endeavouros │
├──────────────┼────────────────────────┼───────────────────────────┼──────────────────────────┤
│ id │ 0 │ 2 │ 3 │
└──────────────┴────────────────────────┴───────────────────────────┴──────────────────────────┘
Expand Down Expand Up @@ -1679,7 +1679,7 @@ struct Bike {
`tabled` has a few representations of tables some differs from it's view some from it's implementation details.

There are situations when you might better use one but not another.
But sometimes some can be used interchangable.
But sometimes some can be used interchangeable.

Bellow you'll find a short list of existing ones. You can find a descriptive information about each at the documentation.

Expand Down Expand Up @@ -2006,7 +2006,7 @@ table.with(Style::modern_rounded());
println!("{table}");
```

The output you're goint to see running it.
The output you're going to see running it.

```text
╭─────────────┬─────────────┬─────────────╮
Expand Down
2 changes: 1 addition & 1 deletion csv_to_table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ csv_to_table = "0.3"

There's 2 approaches the library provides.

- In memory apporach; where we load CSV into memory and then construct a table.
- In memory approach; where we load CSV into memory and then construct a table.
- Sniffing a csv; so the used memory will be limited.
- Setting your constrains so no memory will be used.

Expand Down
2 changes: 1 addition & 1 deletion csv_to_table/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
//! ```
//!
//! You can also use [`iter`] to build an table from [`Iterator`].
//! It is usefull when you have a huge csv and don't want to load it all along into memory.
//! It is useful when you have a huge csv and don't want to load it all along into memory.
//! But it's interface might be a little bit less feature full cause of its limitations.
//!
//! ```
Expand Down
6 changes: 3 additions & 3 deletions csv_to_table/tests/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ test_table!(
"+------+-----------------------------+----------------------+--------------------+---------------+-----------------------------------+-----------------------+---------+"
"| 2021 | Level 1 | All industries | Rubble | H08 | Total expenditure | Financial performance | 654,404 |"
"+------+-----------------------------+----------------------+--------------------+---------------+-----------------------------------+-----------------------+---------+"
"| 2021 | Level 1 | Machinary | Dollars | H09 | Interest and donations | Financial performance | 26,138 |"
"| 2021 | Level 1 | Machinery | Dollars | H09 | Interest and donations | Financial performance | 26,138 |"
"+------+-----------------------------+----------------------+--------------------+---------------+-----------------------------------+-----------------------+---------+"
);

Expand All @@ -178,7 +178,7 @@ test_table!(
"+------+-----------------------------+----------------------+-------+---------------+---------------+-------------------+-------+"
"| 2021 | Level 1 | All industries | Rubbl | H08 | Total expendi | Financial perform | 654,4 |"
"+------+-----------------------------+----------------------+-------+---------------+---------------+-------------------+-------+"
"| 2021 | Level 1 | Machinary | Dolla | H09 | Interest and | Financial perform | 26,13 |"
"| 2021 | Level 1 | Machinery | Dolla | H09 | Interest and | Financial perform | 26,13 |"
"+------+-----------------------------+----------------------+-------+---------------+---------------+-------------------+-------+"
);

Expand Down Expand Up @@ -228,7 +228,7 @@ Year,Industry_aggregation_NZSIOC,Industry_name_NZSIOC,Units,Variable_code,Variab
2021,Level 1,All industries,Dollars,H05,"Interest, dividends and donations",Financial performance,"49,593"
2021,Level 4,All industries,Yean,H07,Non-operating income,Financial performance,"33,020"
2021,Level 1,All industries,Rubble,H08,Total expenditure,Financial performance,"654,404"
2021,Level 1,Machinary,Dollars,H09,Interest and donations,Financial performance,"26,138"
2021,Level 1,Machinery,Dollars,H09,Interest and donations,Financial performance,"26,138"
"#;

DATA.trim().as_bytes()
Expand Down
12 changes: 6 additions & 6 deletions json_to_table/tests/test_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ test_table!(
);

test_table!(
many_splits_bettween_map_entries_test,
many_splits_between_map_entries_test,
json_to_table(&json!(
{
"menu": { "heade1": { "heade2": { "heade3": "SVG Viewer" } } },
Expand All @@ -556,7 +556,7 @@ test_table!(
);

test_table!(
aray_split_test_0,
array_split_test_0,
json_to_table(&json!(
{
"menu2": [ { "heade1": { "heade3": "SVG Viewe1" } }, { "heade5": { "heade7": "SVG Viewe9" } } ],
Expand All @@ -577,7 +577,7 @@ test_table!(
);

test_table!(
aray_split_test_1,
array_split_test_1,
json_to_table(&json!(
{
"menu2": [
Expand All @@ -596,7 +596,7 @@ test_table!(
);

test_table!(
aray_split_test_2,
array_split_test_2,
json_to_table(&json!(
{
"menu2": [ { "header": { "header": "SVG Viewer" } }, { "header": { "header": "SVG Viewer" } } ],
Expand All @@ -617,7 +617,7 @@ test_table!(
);

test_table!(
aray_split_test_3,
array_split_test_3,
json_to_table(&json!(
{
"host": { "long_os_version": "", "uptime": 0.0 },
Expand All @@ -636,7 +636,7 @@ test_table!(
);

test_table!(
aray_split_test_4,
array_split_test_4,
json_to_table(&json!(
{
"key1": [
Expand Down
4 changes: 2 additions & 2 deletions papergrid/src/config/spanned/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,12 +686,12 @@ impl SpannedConfig {
}

/// Verifies if there's any custom alignment vertical set.
pub fn has_alignemnt_vertical(&self) -> bool {
pub fn has_alignment_vertical(&self) -> bool {
!self.alignment_v.is_empty()
}

/// Verifies if there's any custom alignment horizontal set.
pub fn has_alignemnt_horizontal(&self) -> bool {
pub fn has_alignment_horizontal(&self) -> bool {
!self.alignment_h.is_empty()
}

Expand Down
14 changes: 7 additions & 7 deletions papergrid/src/grid/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ fn print_grid_row<F, I, T, C, D>(
margin: &Sides<ColoredIndent>,
padding: &Sides<ColoredIndent>,
borders: &HorizontalLine<ColoredIndent>,
alignemnt: AlignmentHorizontal,
alignment: AlignmentHorizontal,
row: usize,
) -> fmt::Result
where
Expand All @@ -348,7 +348,7 @@ where
}

print_indent(f, margin.left)?;
print_row_columns_one_line(f, data, dims, colors, borders, padding, alignemnt, row)?;
print_row_columns_one_line(f, data, dims, colors, borders, padding, alignment, row)?;
print_indent(f, margin.right)?;

for _ in 0..padding.top.space.size {
Expand Down Expand Up @@ -448,7 +448,7 @@ fn print_row_columns_one_line<F, I, T, D, C>(
colors: &C,
borders: &HorizontalLine<ColoredIndent>,
padding: &Sides<ColoredIndent>,
alignement: AlignmentHorizontal,
alignment: AlignmentHorizontal,
row: usize,
) -> fmt::Result
where
Expand All @@ -464,13 +464,13 @@ where

let text = data
.next()
.expect("we check in the beggining that size must be at least 1 column");
.expect("we check in the beginning that size must be at least 1 column");
let width = dims.get_width(0);
let color = colors.get_color((row, 0));

let text = text.as_ref();
let text = text.lines().next().unwrap_or("");
print_cell(f, text, color, padding, alignement, width)?;
print_cell(f, text, color, padding, alignment, width)?;

match borders.intersection {
Some(indent) => {
Expand All @@ -483,7 +483,7 @@ where
let text = text.lines().next().unwrap_or("");

print_char(f, indent.space.fill, indent.color)?;
print_cell(f, text, color, padding, alignement, width)?;
print_cell(f, text, color, padding, alignment, width)?;
}
}
None => {
Expand All @@ -495,7 +495,7 @@ where
let text = text.as_ref();
let text = text.lines().next().unwrap_or("");

print_cell(f, text, color, padding, alignement, width)?;
print_cell(f, text, color, padding, alignment, width)?;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion papergrid/src/records/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub trait Records {
fn hint_count_rows(&self) -> Option<usize>;
}

// todo: Provide a convinient way to iter over columns
// todo: Provide a convenient way to iter over columns
//
// probably fn iter_columns(self) -> Option<Self::Iter2>
//
Expand Down
2 changes: 1 addition & 1 deletion papergrid/tests/grid/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ test_table!(
);

// #[test]
// #[ignore = "I am not sure what is the right behaiviour here"]
// #[ignore = "I am not sure what is the right behaviour here"]
// fn hieroglyph_handling() {
// let grid = util::grid_from([["哈哈", "哈"]]);

Expand Down
4 changes: 2 additions & 2 deletions ron_to_table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ It uses [`tabled`](https://github.com/zhiburt/tabled) as a rendering backend.

## Get started

The library supports 2 modes for a table embeded and collapsed.
The library supports 2 modes for a table embedded and collapsed.
It also provides with a list of options to modify the table, such as style, alignment, padding and more.

You can change an orientation of a `map` and `sequence` via `Orientation`.
Expand All @@ -22,7 +22,7 @@ ron_to_table = "0.1.0"

<table>
<tr>
<th> Example (embeded) </th>
<th> Example (embedded) </th>
<th> Result </th>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions ron_to_table/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! The library creates pretty table out of a [`ron`] object.
//!
//! The are 2 types of tables you can create.
//! 1. Embeded (default)
//! 1. Embedded (default)
//! 2. Collapsed
//!
//! # Examples
//!
//! Embeded table.
//! Embedded table.
//!
//! ```
//! let data = r#"GameConfig(
Expand Down
4 changes: 2 additions & 2 deletions static_table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

The library provides a macros to build a pretty tables at compile time.

There's 2 types of tables you can buid.
There's 2 types of tables you can build.

1. Standart adjusted tables (`static_table::static_table`).
1. Standard adjusted tables (`static_table::static_table`).
2. Not adjusted, floating tables (`static_table::pool_table`).

To find a more features and settings which you can use with the macros please check out the documentation ([docs.rs](https://docs.rs/static_table)).
Expand Down
6 changes: 3 additions & 3 deletions table_to_html/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,13 @@
//! )
//! ```
//!
//! The default table might look not very represenative.
//! The default table might look not very representative.
//! But it's considered that you might improve it by suplying your own CSS.
//!
//! In a mean time there's some regular style options.
//!
//! Also notice that table elements does not have any special `id`, `class` attributes.
//! It's supposed that you might add them if nessary your self, by using [`HtmlTable::visit_mut`]
//! It's supposed that you might add them if necessary your self, by using [`HtmlTable::visit_mut`]
//!
//! ## Adding custom ids example.
//!
Expand Down Expand Up @@ -548,7 +548,7 @@ fn set_cell_attribute(table: &mut HtmlElement, pos: Position, attr: Attribute) {
}
}
} else {
// loking for a column
// looking for a column

if e.tag() == "td" || e.tag() == "th" {
if self.cursor == self.pos {
Expand Down
10 changes: 5 additions & 5 deletions table_to_html/tests/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ test_table!(
Some(HtmlValue::Elements(vec![HtmlElement::new(
"td",
vec![],
Some(HtmlValue::Content(String::from("Hello Wolrd"))),
Some(HtmlValue::Content(String::from("Hello World"))),
)])),
)])),
),
"<table>"
" <tr id=\"tr1\">"
" <td>"
" Hello Wolrd"
" Hello World"
" </td>"
" </tr>"
"</table>"
Expand All @@ -46,7 +46,7 @@ fn html_element_visitor() {
HtmlElement::new(
"td",
vec![],
Some(HtmlValue::Content(String::from("Hello Wolrd"))),
Some(HtmlValue::Content(String::from("Hello World"))),
),
HtmlElement::new(
"td",
Expand All @@ -56,7 +56,7 @@ fn html_element_visitor() {
HtmlElement::new(
"td",
vec![],
Some(HtmlValue::Content(String::from("Wolrd"))),
Some(HtmlValue::Content(String::from("World"))),
),
])),
)])),
Expand Down Expand Up @@ -102,7 +102,7 @@ fn html_element_visitor_mut() {
HtmlElement::new(
"td",
vec![],
Some(HtmlValue::Content(String::from("Wolrd"))),
Some(HtmlValue::Content(String::from("World"))),
),
])),
)])),
Expand Down
2 changes: 1 addition & 1 deletion tabled/benches/lib_comp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
We profile only actuall table construction.

**Be WARE** that it's being run agains a specific (but general) use case.
Some libraries **might** perform better in certain senarios or certain use cases.
Some libraries **might** perform better in certain scenarios or certain use cases.

## Result

Expand Down
Loading

0 comments on commit e87ce94

Please sign in to comment.