Bläddra i källkod

Minor cleanups.

Kestrel 7 månader sedan
förälder
incheckning
fe8291cc2b
3 ändrade filer med 4 tillägg och 22 borttagningar
  1. 0 3
      microrm/src/cli/clap_interface.rs
  2. 0 17
      microrm/src/db.rs
  3. 4 2
      microrm/tests/mutual.rs

+ 0 - 3
microrm/src/cli/clap_interface.rs

@@ -144,15 +144,12 @@ impl<O: CLIObject> InterfaceVerb<O> {
                     return;
                 }
 
-                println!("EP: {}", std::any::type_name::<EP>());
-                // println!("EP: {}", std::any::
                 EP::Datum::accept_entity_visitor(self);
             }
         }
 
         impl<'l, IC: InterfaceCustomization, OE: Entity> EntityVisitor for RelationFinder<'l, IC, OE> {
             fn visit<E: Entity>(&mut self) {
-                println!("\trelationfinder visiting entity {}", E::entity_name());
                 *self.keys = collect_keys::<E, IC>(self.submatches, ValueRole::AttachmentTarget);
             }
         }

+ 0 - 17
microrm/src/db.rs

@@ -202,14 +202,6 @@ impl<'l> Transaction<'l> {
         self.committed = true;
 
         self.db.execute_raw_sql("COMMIT")
-
-        /*struct CommitQuery;
-        self.db.with_prepared(
-            std::any::TypeId::of::<CommitQuery>(),
-            || "COMMIT".to_string(),
-            |ctx| {
-                ctx.run().map(|_| ())
-            })*/
     }
 }
 
@@ -217,15 +209,6 @@ impl<'l> Drop for Transaction<'l> {
     fn drop(&mut self) {
         if !self.committed {
             let _ = self.db.execute_raw_sql("ROLLBACK");
-            /*
-            struct AbortQuery;
-            let _ = self.db.with_prepared(
-                std::any::TypeId::of::<AbortQuery>(),
-                || "ROLLBACK".to_string(),
-                |ctx| {
-                    ctx.run().map(|_| ())
-                });
-            */
         }
     }
 }

+ 4 - 2
microrm/tests/mutual.rs

@@ -70,14 +70,16 @@ fn simple_operations() {
 
     log::trace!(
         "connecting customer a (ID {:?}) to receipt a (ID {:?})",
-        ca, ra
+        ca,
+        ra
     );
     e_ca.receipts
         .connect_to(ra)
         .expect("couldn't relationiate customer with receipt a");
     log::trace!(
         "connecting customer a (ID {:?}) to receipt b (ID {:?})",
-        ca, rb
+        ca,
+        rb
     );
     e_ca.receipts
         .connect_to(rb)