Skip to content

Commit 4a20e53

Browse files
committed
Remove turbofishes from .get_results() calls
This makes the code a little more readable and helps `intellij-rust` in understanding the types of the variables
1 parent 621742f commit 4a20e53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/boot/categories.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub fn sync_with_connection(toml_str: &str, conn: &PgConnection) -> Result<()> {
103103
.collect::<Vec<_>>();
104104

105105
conn.transaction(|| {
106-
let slugs = diesel::insert_into(categories)
106+
let slugs: Vec<String> = diesel::insert_into(categories)
107107
.values(&to_insert)
108108
.on_conflict(slug)
109109
.do_update()
@@ -112,7 +112,7 @@ pub fn sync_with_connection(toml_str: &str, conn: &PgConnection) -> Result<()> {
112112
description.eq(excluded(description)),
113113
))
114114
.returning(slug)
115-
.get_results::<String>(&*conn)?;
115+
.get_results(&*conn)?;
116116

117117
diesel::delete(categories)
118118
.filter(slug.ne(all(slugs)))

0 commit comments

Comments
 (0)