mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
Run rustfmt
This commit is contained in:
parent
523a21dac4
commit
3678e86654
7 changed files with 27 additions and 22 deletions
|
|
@ -210,7 +210,9 @@ pub fn handle_connection_read_event(
|
|||
|
||||
if let Some(established) = connection.get_established() {
|
||||
match established.read_request() {
|
||||
Ok(Request::Announce(ref r)) if !state.access_list.allows(access_list_mode, &r.info_hash.0) => {
|
||||
Ok(Request::Announce(ref r))
|
||||
if !state.access_list.allows(access_list_mode, &r.info_hash.0) =>
|
||||
{
|
||||
let meta = ConnectionMeta {
|
||||
worker_index: socket_worker_index,
|
||||
poll_token,
|
||||
|
|
@ -223,7 +225,7 @@ pub fn handle_connection_read_event(
|
|||
local_responses.push((meta, Response::Failure(response)));
|
||||
|
||||
break;
|
||||
},
|
||||
}
|
||||
Ok(request) => {
|
||||
let meta = ConnectionMeta {
|
||||
worker_index: socket_worker_index,
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@ use crate::{common::*, config::Config};
|
|||
pub fn update_access_list(config: &Config, state: &State) {
|
||||
match config.access_list.mode {
|
||||
AccessListMode::Require | AccessListMode::Forbid => {
|
||||
if let Err(err) = state
|
||||
.access_list
|
||||
.update_from_path(&config.access_list.path)
|
||||
{
|
||||
if let Err(err) = state.access_list.update_from_path(&config.access_list.path) {
|
||||
::log::error!("Couldn't update access list: {:?}", err);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue