chore: clippy warning fixes and formatting

This commit is contained in:
Namilsk 2026-10-13 20:27:57 +03:00
parent d14558ce45
commit 5502f21605
No known key found for this signature in database
GPG key ID: 2B2F0A4D870B4F9F
6 changed files with 23 additions and 41 deletions

View file

@ -45,7 +45,7 @@ pub struct GeoIpService {
impl GeoIpService {
pub fn new(config: Config) -> Result<Self, Box<dyn std::error::Error>> {
let path = config.geo_files.get(0).unwrap();
let path = config.geo_files.first().unwrap();
let reader = Reader::open_readfile(path)?;
Ok(Self { reader })
}

View file

@ -2,7 +2,7 @@ use crate::geoparsers::v2ray::parsing::decode_geosite_stream;
use crate::geoparsers::v2ray::types::{GeoSite, GeoSiteList};
use std::fs;
use std::io::{BufReader, Read};
use std::io::BufReader;
pub struct GeoSiteService {
index: GeoSiteList,

View file

@ -33,17 +33,7 @@ pub mod domain {
}
}
/// Type of domain value.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Type {
/// The value is used as is.