From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/tabled/examples/alphabet.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 vendor/tabled/examples/alphabet.rs (limited to 'vendor/tabled/examples/alphabet.rs') diff --git a/vendor/tabled/examples/alphabet.rs b/vendor/tabled/examples/alphabet.rs new file mode 100644 index 000000000..5cc8250ad --- /dev/null +++ b/vendor/tabled/examples/alphabet.rs @@ -0,0 +1,13 @@ +//! This example demonstrates instantiating a [`Table`] from an [`IntoIterator`] compliant object. +//! +//! * Note how [`Range`] [expression syntax](https://doc.rust-lang.org/reference/expressions/range-expr.html) +//! is used to idiomatically represent the English alphabet. + +use std::iter::FromIterator; + +use tabled::Table; + +fn main() { + let table = Table::from_iter(['a'..='z']); + println!("{table}"); +} -- cgit v1.2.3