make usable

This commit is contained in:
2022-09-21 13:30:10 +02:00
parent 91273cc193
commit aeb69bab26
4 changed files with 22 additions and 66 deletions

View File

@@ -4,7 +4,7 @@ use std::str::FromStr;
use std::io::prelude::*;
use std::collections::HashMap;
static file: &str = "mrprox.conf";
static FILE: &str = "mrprox.conf";
pub struct Servers{
l_servers : HashMap<String, String>,
@@ -18,7 +18,7 @@ impl Servers {
}
fn get_servers() -> HashMap<String, String> {
let mut f = File::open(&file).unwrap();
let mut f = File::open(&FILE).unwrap();
let mut s = String::new();
let mut ret = HashMap::new();
f.read_to_string(&mut s).unwrap();