Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Veclite: A Vec alternative
Veclite implements std::fmt::Display
, allowing for formatting and readable text.
Add this to your Cargo.toml
:
[dependencies]
veclite = "0.2"
Veclite is normally used using the Vel
alias:
use veclite::Vel;
fn main() {
let mut list = Vel::new;
list.add(1);
list.add(2);
list.add(3);
println!("List: {}", list)
}
You can also use the Veclite
struct, which is more inconvenient:
use veclite::Veclite;
fn main() {
let mut list = Veclite::new;
list.add(1);
list.add(2);
list.add(3);
println!("List: {}", list)
}
You can suggest improvements or contribute at https://github.com/Pjdur/Veclite/contribute
5 posts - 3 participants
🏷️ rust_feed