Fix some clippy issues
This commit is contained in:
		
							parent
							
								
									8a83602d6a
								
							
						
					
					
						commit
						b2e9c6b27a
					
				
					 4 changed files with 4 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -43,7 +43,7 @@ async fn main() -> Result<(), std::io::Error> {
 | 
			
		|||
	});
 | 
			
		||||
	let app_state_pool = pool.clone();
 | 
			
		||||
	let app_state = Actor::start_in_arbiter(&app_state_arbiter.handle(), move |_| {
 | 
			
		||||
		AppState::new(app_state_pool.clone())
 | 
			
		||||
		AppState::new(app_state_pool)
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	log::info!(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -170,7 +170,7 @@ impl DbRelay {
 | 
			
		|||
		conn: &mut PoolConnection<Sqlite>,
 | 
			
		||||
	) -> Result<DbSchedule, DatabaseError> {
 | 
			
		||||
		let weekday = utils::get_weekday();
 | 
			
		||||
		DbJunctionRelaySchedule::get_schedule(conn, &self, weekday as Weekday)
 | 
			
		||||
		DbJunctionRelaySchedule::get_schedule(conn, self, weekday as Weekday)
 | 
			
		||||
			.await?
 | 
			
		||||
			.ok_or(DatabaseError::NotFound)
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ impl DbTag {
 | 
			
		|||
		conn: &mut PoolConnection<Sqlite>,
 | 
			
		||||
		new_tag: &str,
 | 
			
		||||
	) -> Result<DbTag, DatabaseError> {
 | 
			
		||||
		if new_tag.len() == 0 {
 | 
			
		||||
		if new_tag.is_empty() {
 | 
			
		||||
			return Err(DatabaseError::EmptyDataInsert);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,7 @@ pub struct Logging {
 | 
			
		|||
	pub file: String,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Clone, Debug, Deserialize)]
 | 
			
		||||
#[derive(Clone, Debug, Deserialize, Default)]
 | 
			
		||||
#[serde(default)]
 | 
			
		||||
#[allow(unused)]
 | 
			
		||||
pub struct Permissions {
 | 
			
		||||
| 
						 | 
				
			
			@ -45,15 +45,6 @@ impl Default for Logging {
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl Default for Permissions {
 | 
			
		||||
	fn default() -> Self {
 | 
			
		||||
		Permissions {
 | 
			
		||||
			user: String::from(""),
 | 
			
		||||
			group: String::from(""),
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub fn load<T>(config_name: &str, env_prefix: &str) -> Result<T, EmgauwaError>
 | 
			
		||||
where
 | 
			
		||||
	for<'de> T: serde::Deserialize<'de>,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue