Run clippy fixes
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use axum::debug_handler;
|
||||
use axum::http::HeaderMap;
|
||||
use axum::{extract::State, routing::post, Json, Router};
|
||||
use serde::Deserialize;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use axum::{
|
||||
extract::{FromRef, State},
|
||||
extract::State,
|
||||
http::HeaderMap,
|
||||
Json,
|
||||
};
|
||||
@@ -137,19 +137,12 @@ pub struct MigrationResponse {
|
||||
remove: Vec<(String, Name)>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct MigrationStore {
|
||||
pub store: HashMap<u32, MembersDiff>,
|
||||
pub count: u32,
|
||||
}
|
||||
|
||||
impl Default for MigrationStore {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
count: 0,
|
||||
store: HashMap::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Row {
|
||||
fn from_csv_many(input: &str) -> Result<Vec<Self>, csv::Error> {
|
||||
@@ -181,25 +174,25 @@ impl Row {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<Name> for Row {
|
||||
fn into(self) -> Name {
|
||||
impl From<Row> for Name {
|
||||
fn from(val: Row) -> Self {
|
||||
Name {
|
||||
first: self.first_name,
|
||||
first: val.first_name,
|
||||
full: "Temporarely full name".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<Member> for Row {
|
||||
fn into(self) -> Member {
|
||||
let name: Name = self.clone().into();
|
||||
impl From<Row> for Member {
|
||||
fn from(val: Row) -> Self {
|
||||
let name: Name = val.clone().into();
|
||||
|
||||
Member {
|
||||
id: self.id.clone(),
|
||||
id: val.id.clone(),
|
||||
name,
|
||||
registration_token: None,
|
||||
diploma: self.diploma.clone(),
|
||||
groups: self.groups_parsed(),
|
||||
diploma: val.diploma.clone(),
|
||||
groups: val.groups_parsed(),
|
||||
roles: Roles::MEMBER,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user