mirror of
https://github.com/minoplhy/chhoto-url.git
synced 2024-11-24 17:56:49 +00:00
fix: Typo during reading slug_length, fixes #24
This commit is contained in:
parent
5bbaad3001
commit
9fc8634704
@ -49,7 +49,7 @@ pub fn add_link(req: String, db: &Connection) -> (bool, String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let style = env::var("slug_style").unwrap_or(String::from("Pair"));
|
let style = env::var("slug_style").unwrap_or(String::from("Pair"));
|
||||||
let mut len = env::var("slug_style")
|
let mut len = env::var("slug_length")
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|s| s.parse::<usize>().ok())
|
.and_then(|s| s.parse::<usize>().ok())
|
||||||
.unwrap_or(8);
|
.unwrap_or(8);
|
||||||
|
Loading…
Reference in New Issue
Block a user