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
|
|
@ -146,17 +146,21 @@ fn read_requests(
|
|||
}
|
||||
|
||||
match request {
|
||||
Ok(Request::Announce(AnnounceRequest { info_hash, transaction_id, ..})) if !state.access_list.allows(access_list_mode, &info_hash.0) => {
|
||||
Ok(Request::Announce(AnnounceRequest {
|
||||
info_hash,
|
||||
transaction_id,
|
||||
..
|
||||
})) if !state.access_list.allows(access_list_mode, &info_hash.0) => {
|
||||
let response = Response::Error(ErrorResponse {
|
||||
transaction_id,
|
||||
message: "Info hash not allowed".into()
|
||||
message: "Info hash not allowed".into(),
|
||||
});
|
||||
|
||||
local_responses.push((response, src))
|
||||
},
|
||||
}
|
||||
Ok(request) => {
|
||||
requests.push((request, src));
|
||||
},
|
||||
}
|
||||
Err(err) => {
|
||||
::log::debug!("request_from_bytes error: {:?}", err);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,7 @@ use crate::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!("Update access list from path: {:?}", err);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue