style(rust): Format all Rust code with rustfmt
Change-Id: Iab7e00cc26a4f9727d3ab98691ef379921a33052 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5240 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
3318982f81
commit
3d8ee62087
42 changed files with 1253 additions and 876 deletions
|
|
@ -16,9 +16,9 @@
|
|||
// along with this program. If not, see
|
||||
// <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::schema::{posts, simple_posts, threads, users};
|
||||
use chrono::prelude::{DateTime, Utc};
|
||||
use crate::schema::{users, threads, posts, simple_posts};
|
||||
use diesel::sql_types::{Text, Integer};
|
||||
use diesel::sql_types::{Integer, Text};
|
||||
|
||||
/// Represents a single user in the Converse database. Converse does
|
||||
/// not handle logins itself, but rather looks them up based on the
|
||||
|
|
@ -85,21 +85,21 @@ pub struct ThreadIndex {
|
|||
}
|
||||
|
||||
#[derive(Deserialize, Insertable)]
|
||||
#[table_name="threads"]
|
||||
#[table_name = "threads"]
|
||||
pub struct NewThread {
|
||||
pub title: String,
|
||||
pub user_id: i32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Insertable)]
|
||||
#[table_name="users"]
|
||||
#[table_name = "users"]
|
||||
pub struct NewUser {
|
||||
pub email: String,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Insertable)]
|
||||
#[table_name="posts"]
|
||||
#[table_name = "posts"]
|
||||
pub struct NewPost {
|
||||
pub thread_id: i32,
|
||||
pub body: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue