Explorar o código

rustfmt pass.

Kestrel hai 3 semanas
pai
achega
47029a1b43
Modificáronse 1 ficheiros con 42 adicións e 15 borrados
  1. 42 15
      microrm/tests/nested_schemata.rs

+ 42 - 15
microrm/tests/nested_schemata.rs

@@ -15,7 +15,7 @@ struct Subject {
 
 #[derive(Entity)]
 struct Verb {
-    written: String
+    written: String,
 }
 
 #[derive(Default, Schema)]
@@ -48,21 +48,48 @@ fn nested() {
     let (pool, db): (_, CombinedSchema) = common::open_test_db!();
     let mut lease = pool.acquire().unwrap();
 
-    let obj_id = db.dictionary.objects.insert(&mut lease, Object {
-        written: String::from("an_object")
-    }).expect("couldn't insert object");
+    let obj_id = db
+        .dictionary
+        .objects
+        .insert(
+            &mut lease,
+            Object {
+                written: String::from("an_object"),
+            },
+        )
+        .expect("couldn't insert object");
 
-    let subj_id = db.dictionary.subjects.insert(&mut lease, Subject {
-        written: String::from("a_subject")
-    }).expect("couldn't insert subject");
+    let subj_id = db
+        .dictionary
+        .subjects
+        .insert(
+            &mut lease,
+            Subject {
+                written: String::from("a_subject"),
+            },
+        )
+        .expect("couldn't insert subject");
 
-    let verb_id = db.dictionary.verbs.insert(&mut lease, Verb {
-        written: String::from("verb1")
-    }).expect("couldn't insert verb");
+    let verb_id = db
+        .dictionary
+        .verbs
+        .insert(
+            &mut lease,
+            Verb {
+                written: String::from("verb1"),
+            },
+        )
+        .expect("couldn't insert verb");
 
-    db.sentence.sentences.insert(&mut lease, Sentence {
-        object: obj_id,
-        subject: subj_id,
-        verb: verb_id,
-    }).expect("couldn't insert sentence");
+    db.sentence
+        .sentences
+        .insert(
+            &mut lease,
+            Sentence {
+                object: obj_id,
+                subject: subj_id,
+                verb: verb_id,
+            },
+        )
+        .expect("couldn't insert sentence");
 }