format
This commit is contained in:
parent
d9da160e3f
commit
fa34717836
2 changed files with 12 additions and 8 deletions
|
@ -133,7 +133,8 @@ pub trait DataSource {
|
||||||
fs::write(
|
fs::write(
|
||||||
path.join(format!("CGG_{}_{}.json", id, pos)),
|
path.join(format!("CGG_{}_{}.json", id, pos)),
|
||||||
serde_json::to_string_pretty(&item_set).unwrap(),
|
serde_json::to_string_pretty(&item_set).unwrap(),
|
||||||
).unwrap();
|
)
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
error!("Can't get data for {} at {}", id, pos);
|
error!("Can't get data for {} at {}", id, pos);
|
||||||
|
|
|
@ -60,7 +60,10 @@ fn main() {
|
||||||
info!("LoL Champs Folder: {}", lol_champs_dir.to_str().unwrap());
|
info!("LoL Champs Folder: {}", lol_champs_dir.to_str().unwrap());
|
||||||
|
|
||||||
let mut headers = header::HeaderMap::new();
|
let mut headers = header::HeaderMap::new();
|
||||||
headers.insert(header::USER_AGENT, header::HeaderValue::from_static(USER_AGENT));
|
headers.insert(
|
||||||
|
header::USER_AGENT,
|
||||||
|
header::HeaderValue::from_static(USER_AGENT),
|
||||||
|
);
|
||||||
|
|
||||||
let client = reqwest::Client::builder()
|
let client = reqwest::Client::builder()
|
||||||
.default_headers(headers)
|
.default_headers(headers)
|
||||||
|
|
Loading…
Add table
Reference in a new issue