diff --git a/plume-models/src/users.rs b/plume-models/src/users.rs index 4d23969..6148fc5 100644 --- a/plume-models/src/users.rs +++ b/plume-models/src/users.rs @@ -100,7 +100,7 @@ impl User { find_by!(users, find_by_name, username as String, instance_id as i32); find_by!(users, find_by_ap_url, ap_url as String); - pub fn one_by_instance(&self, conn: &PgConnection) -> Vec { + pub fn one_by_instance(conn: &PgConnection) -> Vec { users::table.distinct_on(users::instance_id) .get_results::(conn) .expect("Error in User::on_by_instance") diff --git a/src/routes/comments.rs b/src/routes/comments.rs index 65cfb74..e74d696 100644 --- a/src/routes/comments.rs +++ b/src/routes/comments.rs @@ -33,7 +33,7 @@ fn create(blog_name: String, slug: String, data: LenientForm, us let form = data.get(); form.validate() .map(|_| { - let (new_comment, id) = NewComment::build() + let (new_comment, _) = NewComment::build() .content(form.content.clone()) .in_response_to_id(form.responding_to.clone()) .post(post.clone()) @@ -47,7 +47,7 @@ fn create(blog_name: String, slug: String, data: LenientForm, us let user_clone = user.clone(); worker.execute(Thunk::of(move || broadcast(&user_clone, new_comment, dest))); - Redirect::to(format!(uri!(super::posts::details: blog_name = blog_name, slug = slug)) + Redirect::to(uri!(super::posts::details: blog = blog_name, slug = slug)) }) .map_err(|errors| { // TODO: de-duplicate this code