Fmt.
This commit is contained in:
@@ -7,8 +7,7 @@ pub struct Eniro;
|
||||
impl Probe for Eniro {
|
||||
fn search(&mut self, ctx: &mut Context, number: &str) {
|
||||
let body = if let Some(cache) = ctx.cache_get("eniro", &number) {
|
||||
String::from_utf8(cache.data)
|
||||
.unwrap()
|
||||
String::from_utf8(cache.data).unwrap()
|
||||
} else {
|
||||
reqwest::get(&format!("https://gulasidorna.eniro.se/hitta:{}", number))
|
||||
.unwrap()
|
||||
@@ -16,6 +15,7 @@ impl Probe for Eniro {
|
||||
.unwrap()
|
||||
};
|
||||
|
||||
ctx.cache_set("eniro", &number, body.as_bytes()).expect("wut?! why not?!");
|
||||
ctx.cache_set("eniro", &number, body.as_bytes())
|
||||
.expect("wut?! why not?!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user