aboutsummaryrefslogtreecommitdiff
path: root/examples/tutorial02/polls/models.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-06-28 17:12:33 -0600
committerMelody Horn <melody@boringcactus.com>2021-06-28 17:12:33 -0600
commit42d14c943eb31753489b39ef58803c543c023bee (patch)
treee5c7d9e3784192ebdc390dfa481631eaad07f0fd /examples/tutorial02/polls/models.rs
parentb1ec80c918dd9e156c049a500983fb15147c6e14 (diff)
downloadtosin-42d14c943eb31753489b39ef58803c543c023bee.tar.gz
tosin-42d14c943eb31753489b39ef58803c543c023bee.zip
fmt
Diffstat (limited to 'examples/tutorial02/polls/models.rs')
-rw-r--r--examples/tutorial02/polls/models.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tutorial02/polls/models.rs b/examples/tutorial02/polls/models.rs
index c9de156..48e58cc 100644
--- a/examples/tutorial02/polls/models.rs
+++ b/examples/tutorial02/polls/models.rs
@@ -1,9 +1,9 @@
-use tosin::db::models::{Model, Id, gather};
+use tosin::db::models::{gather, Id, Model};
#[derive(Model, PartialEq, Debug)]
pub struct Question {
id: Option<Id>,
- #[model(max_length=200)]
+ #[model(max_length = 200)]
question_text: String,
/// date published
pub_date: chrono::NaiveDateTime,
@@ -14,7 +14,7 @@ pub struct Choice {
id: Option<Id>,
#[model(Question, on_delete=Cascade)]
question: Id,
- #[model(max_length=200)]
+ #[model(max_length = 200)]
choice_text: String,
#[model(default = 0)]
votes: usize,