mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-22 17:44:22 +00:00
Fully remove fetch
feature
This commit is contained in:
parent
a38d04fb5e
commit
bc9d840fe0
2 changed files with 0 additions and 4 deletions
|
@ -45,7 +45,6 @@ impl CoreBundle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fetch from `base_url` the Core Bundle data with the given `locale`.
|
/// Fetch from `base_url` the Core Bundle data with the given `locale`.
|
||||||
#[cfg(feature = "fetch")]
|
|
||||||
pub async fn fetch(client: &reqwest::Client, base_url: &str, locale: &str) -> LoadingResult<Self> {
|
pub async fn fetch(client: &reqwest::Client, base_url: &str, locale: &str) -> LoadingResult<Self> {
|
||||||
let globals = client
|
let globals = client
|
||||||
.get(format!("{base_url}/core/{locale}/data/globals-{locale}.json"))
|
.get(format!("{base_url}/core/{locale}/data/globals-{locale}.json"))
|
||||||
|
@ -82,7 +81,6 @@ pub fn create_globalindexes_from_wd() -> globals::LocalizedGlobalsIndexes {
|
||||||
mod tests {
|
mod tests {
|
||||||
macro_rules! test_fetch {
|
macro_rules! test_fetch {
|
||||||
( $id:ident, $version:literal, $locale:literal ) => {
|
( $id:ident, $version:literal, $locale:literal ) => {
|
||||||
#[cfg(feature = "fetch")]
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn $id() {
|
async fn $id() {
|
||||||
let client = reqwest::Client::new();
|
let client = reqwest::Client::new();
|
||||||
|
|
|
@ -59,7 +59,6 @@ impl SetBundle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fetch from `base_url` the Set Bundle data of the given `set` with the given `locale`.
|
/// Fetch from `base_url` the Set Bundle data of the given `set` with the given `locale`.
|
||||||
#[cfg(feature = "fetch")]
|
|
||||||
pub async fn fetch(client: &reqwest::Client, base_url: &str, locale: &str, set: &str) -> LoadingResult<Self> {
|
pub async fn fetch(client: &reqwest::Client, base_url: &str, locale: &str, set: &str) -> LoadingResult<Self> {
|
||||||
let cards = client
|
let cards = client
|
||||||
.get(format!("{base_url}/{set}/{locale}/data/{set}-{locale}.json"))
|
.get(format!("{base_url}/{set}/{locale}/data/{set}-{locale}.json"))
|
||||||
|
@ -79,7 +78,6 @@ impl SetBundle {
|
||||||
mod tests {
|
mod tests {
|
||||||
macro_rules! test_fetch {
|
macro_rules! test_fetch {
|
||||||
( $id:ident, $version:literal, $locale:literal, $set:literal ) => {
|
( $id:ident, $version:literal, $locale:literal, $set:literal ) => {
|
||||||
#[cfg(feature = "fetch")]
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn $id() {
|
async fn $id() {
|
||||||
let client = reqwest::Client::new();
|
let client = reqwest::Client::new();
|
||||||
|
|
Loading…
Reference in a new issue