Skip to content

Commit

Permalink
doc: modify example
Browse files Browse the repository at this point in the history
  • Loading branch information
tu6ge committed May 26, 2024
1 parent 3deb07e commit 2fe7dd8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/string_custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub fn main() {
gender: "male".into(),
password: "Abc123".into(),
age: 12,
weight: 102.5,
};

let data = Input::new(data).unwrap();
Expand All @@ -29,7 +30,7 @@ struct Input {
gender: String,

Check warning on line 30 in examples/string_custom.rs

View workflow job for this annotation

GitHub Actions / test

fields `gender`, `password`, `age`, and `weight` are never read
password: String,
age: i32,
//weight: f32,
weight: f32,
}

impl Input {
Expand Down Expand Up @@ -70,7 +71,8 @@ diesel::table! {
email -> Varchar,
gender -> Varchar,
password -> Varchar,
age -> Integer
age -> Integer,
weight -> Float,
}
}

Expand Down

0 comments on commit 2fe7dd8

Please sign in to comment.