feat(wpcarro/rust): Include std::fmt::Display example

Gotta know how to `to_string` things

Change-Id: I259ef61ecaf6ae7fabe0b3d211706ba5f429b3a7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6057
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
This commit is contained in:
William Carroll 2022-08-09 10:20:03 -07:00 committed by clbot
parent 783e1190cd
commit 4732603a42
6 changed files with 123 additions and 50 deletions

View file

@ -0,0 +1,18 @@
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
mod display;
mod json;
////////////////////////////////////////////////////////////////////////////////
// Main
////////////////////////////////////////////////////////////////////////////////
fn main() {
let john: display::Person = display::Person {
fname: "John".to_string(),
lname: "Cleese".to_string(),
age: 82,
};
println!("Person: {}", john)
}