Skip to content

Commit

Permalink
Updated ascii_table
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-petruk committed Dec 8, 2022
1 parent 6d931c4 commit 5fc1479
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ serde='1.0'
serde_derive='1.0'
serde_yaml='0.9'
md5="0"
ascii_table="3.0"
ascii_table="4.0"
scrawl="1.1.0"
users="0.11"
walkdir="2"
Expand Down
24 changes: 12 additions & 12 deletions src/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,18 @@ fn get_custom_templates() -> Result<TemplateMap, Error> {

fn build_ascii_table() -> ascii_table::AsciiTable {
let mut table = ascii_table::AsciiTable::default();
let mut column = ascii_table::Column::with_header("Template Name");
column.align = ascii_table::Align::Left;
table.columns.insert(0, column);

let mut column = ascii_table::Column::with_header("Custom");
column.align = ascii_table::Align::Left;
table.columns.insert(1, column);

let mut column = ascii_table::Column::with_header("Extension");
column.align = ascii_table::Align::Left;
table.columns.insert(2, column);

table
.column(0)
.set_header("Template Name")
.set_align(ascii_table::Align::Left);
table
.column(1)
.set_header("Custom")
.set_align(ascii_table::Align::Left);
table
.column(2)
.set_header("Extension")
.set_align(ascii_table::Align::Left);
table
}

Expand Down

0 comments on commit 5fc1479

Please sign in to comment.