pub async fn load_edit(edit_id: u32, conn: &ToolsDb) -> Option<Edit> {
    use schema::edits::dsl::*;
    conn.run(move |c| {
        let edit = edits.filter(id.eq(edit_id)).first(c);
        match edit {
            Ok(edit) => Some(edit),
            Err(_) => None,
        }
    })
    .await
}
/// Load an edit from the db
Load an edit from the db
Load an edit from the db
pub async fn load_edit(edit_id: u32, conn: &ToolsDb) -> Option<Edit> {
    use schema::edits::dsl::*;
    conn.run(move |c| {
        let edit = edits.filter(id.eq(edit_id)).first(c);
        match edit {
            Ok(edit) => Some(edit),
            Err(_) => None,
        }
    })
    .await
}
pub async fn load_edit ( edit_id : u32 , conn : & ToolsDb ) -> Option < Edit > { use schema :: edits :: dsl :: * ; conn . run ( move | c | { let edit = edits . filter ( id . eq ( edit_id ) ) . first ( c ) ; match edit { Ok ( edit ) => Some ( edit ) , Err ( _ ) => None , } } ) . await }
Load an edit from the db
Load an edit from the db
edit_id
u32
conn
&ToolsDb
edit_id
u32
conn
&ToolsDb