rm trailing newlines & add type alias for Vec
This commit is contained in:
parent
c849d32fe6
commit
2a01827e6c
3 changed files with 6 additions and 5 deletions
|
|
@ -16,6 +16,8 @@ pub enum RouteAction {
|
|||
Direct,
|
||||
}
|
||||
|
||||
type Rules = Vec<Rule>;
|
||||
|
||||
/// Type for declaring the routing rules like:
|
||||
/// ```toml
|
||||
/// [rule]
|
||||
|
|
@ -31,10 +33,9 @@ pub struct Rule {
|
|||
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())?;
|
||||
|
||||
|
||||
// Ok(())
|
||||
todo!();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue