Browse Source

Fix sqlite reference to use re_export and clippy nits.

Kestrel 2 years ago
parent
commit
954d1d324b
3 changed files with 3 additions and 3 deletions
  1. 1 1
      .gitignore
  2. 1 1
      microrm-macros/src/lib.rs
  3. 1 1
      microrm/src/model/create.rs

+ 1 - 1
.gitignore

@@ -1,3 +1,3 @@
 .*.sw?
 /target
-
+/archive

+ 1 - 1
microrm-macros/src/lib.rs

@@ -157,7 +157,7 @@ pub fn derive_entity(tokens: TokenStream) -> TokenStream {
                 use #microrm_ref::re_export::sqlite::Bindable;
                 self.0.bind(stmt, col)
             }
-            fn build_from(stmt: &sqlite::Statement, col_offset: usize) -> sqlite::Result<(Self, usize)> where Self: Sized {
+            fn build_from(stmt: &#microrm_ref::re_export::sqlite::Statement, col_offset: usize) -> #microrm_ref::re_export::sqlite::Result<(Self, usize)> where Self: Sized {
                 stmt.read::<i64>(col_offset).map(|x| (#id_name(x), 1))
             }
         }

+ 1 - 1
microrm/src/model/create.rs

@@ -199,7 +199,7 @@ pub fn sql_for_index<
             I::IndexedEntity::table_name(),
             I::columns()
                 .iter()
-                .map(|x| format!("\"{}\"", I::IndexedEntity::name(x.clone())))
+                .map(|x| format!("\"{}\"", I::IndexedEntity::name(*x)))
                 .collect::<Vec<_>>()
                 .join(",")
         ),