mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-08 09:30:43 +01:00
Add pre-commit config
This commit is contained in:
@@ -5,21 +5,13 @@ use crate::prisma::source;
|
||||
#[derive(Serialize)]
|
||||
pub struct Source {
|
||||
pub id: i32,
|
||||
pub name: String
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl From<source::Data> for Source
|
||||
{
|
||||
impl From<source::Data> for Source {
|
||||
fn from(val: source::Data) -> Self {
|
||||
let source::Data {
|
||||
id,
|
||||
name,
|
||||
..
|
||||
} = val;
|
||||
let source::Data { id, name, .. } = val;
|
||||
|
||||
Source {
|
||||
id,
|
||||
name
|
||||
}
|
||||
Source { id, name }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user