rm trailing newlines & add type alias for Vec

This commit is contained in:
zedddie 2026-03-15 13:31:20 +01:00 committed by tuturuu
parent c849d32fe6
commit 2a01827e6c
No known key found for this signature in database
GPG key ID: B352C3C2894405A7
3 changed files with 6 additions and 5 deletions

View file

@ -16,6 +16,8 @@ pub enum RouteAction {
Direct, Direct,
} }
type Rules = Vec<Rule>;
/// Type for declaring the routing rules like: /// Type for declaring the routing rules like:
/// ```toml /// ```toml
/// [rule] /// [rule]
@ -31,10 +33,9 @@ pub struct Rule {
pub action: RouteAction, pub action: RouteAction,
} }
pub fn parse_ruleset(config: NSCConfig) -> Result<Vec<Rule>, Box<dyn std::error::Error>> { pub fn parse_ruleset(config: NSCConfig) -> Result<Rules, Box<dyn std::error::Error>> {
let reader = maxminddb::Reader::open_readfile(config.geo_files[0].clone())?; let reader = maxminddb::Reader::open_readfile(config.geo_files[0].clone())?;
// Ok(()) // Ok(())
todo!(); todo!();
} }