From ee4f78d8898823d0a8b8adae8d90286982537056 Mon Sep 17 00:00:00 2001 From: Jan Range Date: Thu, 18 Jul 2024 23:58:59 +0200 Subject: [PATCH] remove `to_string` and `ok` --- tests/dataset.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/dataset.rs b/tests/dataset.rs index 106cbfe..8a801e7 100644 --- a/tests/dataset.rs +++ b/tests/dataset.rs @@ -11,13 +11,11 @@ mod tests { lazy_static! { static ref BASE_URL: String = std::env::var("BASE_URL") - .ok() .expect("BASE_URL must be set for tests"); } lazy_static! { static ref API_TOKEN: String = std::env::var("API_TOKEN") - .ok() .expect("API_TOKEN must be set for tests"); } @@ -25,7 +23,7 @@ mod tests { async fn test_create_delete_dataset() { // Part 1: Create a dataset // Arrange - let client = BaseClient::new(&BASE_URL.to_string(), Some(&API_TOKEN.to_string())).unwrap(); + let client = BaseClient::new(&BASE_URL, Some(&API_TOKEN)).unwrap(); let body = fs::read_to_string("tests/fixtures/create_dataset_body.json") .expect("Could not read body"); let body = serde_json::from_str::(&body); @@ -105,7 +103,7 @@ mod tests { async fn test_dataset_file_upload() { // Part 1: Create a dataset // Arrange - let client = BaseClient::new(&BASE_URL.to_string(), Some(&API_TOKEN.to_string())).unwrap(); + let client = BaseClient::new(&BASE_URL, Some(&API_TOKEN)).unwrap(); let body = fs::read_to_string("tests/fixtures/create_dataset_body.json") .expect("Could not read body");