You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error::html_parse_error("location <a> does not have a href attr")
33
+
})?)
34
+
else{
35
35
returnErr(Error::html_parse_error("Location url is invalid"));
36
36
};
37
37
38
38
let id = url
39
39
.query_pairs()
40
40
.find(|x| x.0 == "locationNum")
41
-
.ok_or(Error::html_parse_error(
42
-
"Location url does not include the `locationNum` query parameter",
43
-
))?
41
+
.ok_or_else(|| {
42
+
Error::html_parse_error(
43
+
"Location url does not include the `locationNum` query parameter",
44
+
)
45
+
})?
44
46
.1
45
47
.into_owned();
46
48
@@ -54,18 +56,35 @@ impl<'a> Location<'a> {
54
56
if name.is_empty(){
55
57
returnErr(Error::html_parse_error("Location name is missing"));
56
58
}
57
-
58
-
let menu = client.get(url).header("Cookie",format!("WebInaCartDates=; WebInaCartLocation={id}; WebInaCartMeals=; WebInaCartQtys=; WebInaCartRecipes=")).send().await?.text().await?;
0 commit comments