Skip to content

Commit

Permalink
Merge pull request #3 from tertsdiepraam/rust-2021-edition
Browse files Browse the repository at this point in the history
More maintainance fixes
  • Loading branch information
sylvestre authored Nov 19, 2022
2 parents d52d701 + 2eae77b commit bfea0a5
Show file tree
Hide file tree
Showing 6 changed files with 292 additions and 303 deletions.
2 changes: 0 additions & 2 deletions .rustfmt.toml

This file was deleted.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
name = "term_grid"
description = "Library for formatting strings into a grid layout"

authors = ["Benjamin Sago <[email protected]>"]
documentation = "https://docs.rs/term_grid/"
exclude = ["/.rustfmt.toml", "/.travis.yml"]
authors = ["uutils developers", "Benjamin Sago <[email protected]>"]
documentation = "https://docs.rs/uutils_term_grid/"
license = "MIT"
readme = "README.md"
repository = "https://github.com/ogham/rust-term-grid"
repository = "https://github.com/uutils/uutils-term-grid"
version = "0.2.0"
edition = "2021"
rust-version = "1.56"

[lib]
name = "term_grid"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This crate works with `cargo`. Add the following to your `Cargo.toml` dependenci
uutils_term_grid = "0.2"
```

The Minimum Supported Rust Version is 1.31.
The Minimum Supported Rust Version is 1.56.


## Usage
Expand Down
9 changes: 4 additions & 5 deletions examples/basic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extern crate term_grid;
use term_grid::{Grid, GridOptions, Direction, Filling, Cell, Alignment};
use term_grid::{Alignment, Cell, Direction, Filling, Grid, GridOptions};

// This produces:
//
Expand All @@ -13,8 +13,8 @@ use term_grid::{Grid, GridOptions, Direction, Filling, Cell, Alignment};

fn main() {
let mut grid = Grid::new(GridOptions {
direction: Direction::TopToBottom,
filling: Filling::Text(" | ".into()),
direction: Direction::TopToBottom,
filling: Filling::Text(" | ".into()),
});

for i in 0..48 {
Expand All @@ -25,8 +25,7 @@ fn main() {

if let Some(grid_display) = grid.fit_into_width(80) {
println!("{}", grid_display);
}
else {
} else {
println!("Couldn't fit grid into 80 columns!");
}
}
Loading

0 comments on commit bfea0a5

Please sign in to comment.