Follow Rust and crates update

This commit is contained in:
Kitaiti Makoto
2021-11-28 07:53:13 +09:00
parent 9187e4dde9
commit ae3344f318
35 changed files with 208 additions and 160 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ pub fn import_migrations(input: TokenStream) -> TokenStream {
(name, up_sql, down_sql)
})
.collect::<Vec<_>>();
let migrations_name = migrations.iter().map(|m| &m.0).collect::<Vec<_>>();
let migrations_name = migrations.iter().map(|m| &m.0);
let migrations_up = migrations
.iter()
.map(|m| m.1.as_str())
@@ -103,7 +103,7 @@ fn file_to_migration(file: &str) -> TokenStream2 {
acc.push('\n');
}
} else if let Some(acc_str) = line.strip_prefix("--#!") {
acc.push_str(&acc_str);
acc.push_str(acc_str);
acc.push('\n');
} else if line.starts_with("--") {
continue;