mirror of
https://github.com/TeamPiped/reqwest4j.git
synced 2024-08-14 23:54:39 +00:00
Remove unnecessary boilerplate code.
This commit is contained in:
parent
35653a4832
commit
be5ff40c97
1 changed files with 0 additions and 15 deletions
|
@ -7,10 +7,6 @@ use lazy_static::lazy_static;
|
||||||
use reqwest::{Client, Method, Url};
|
use reqwest::{Client, Method, Url};
|
||||||
use tokio::runtime::Runtime;
|
use tokio::runtime::Runtime;
|
||||||
|
|
||||||
pub fn add(left: usize, right: usize) -> usize {
|
|
||||||
left + right
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref RUNTIME: Runtime = Runtime::new().unwrap();
|
static ref RUNTIME: Runtime = Runtime::new().unwrap();
|
||||||
static ref CLIENT: Client = Client::builder()
|
static ref CLIENT: Client = Client::builder()
|
||||||
|
@ -101,14 +97,3 @@ pub extern "system" fn Java_rocks_kavin_reqwest4j_ReqwestUtils_fetch(
|
||||||
|
|
||||||
response.into_raw()
|
response.into_raw()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn it_works() {
|
|
||||||
let result = add(2, 2);
|
|
||||||
assert_eq!(result, 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue