From 2936e3262083c0b411eb8b131b7ed5e88498319a Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Sun, 27 Aug 2023 22:31:55 +0200 Subject: [PATCH] Fix clippy CI job & make examples buildable --- .github/workflows/ci.yaml | 2 +- examples/create_message.rs | 6 ++++-- examples/websocket.rs | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8ce0959..6a23e27 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - features: ["", "app", "client", "full"] + features: ['""', "app", "client", "full"] steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable diff --git a/examples/create_message.rs b/examples/create_message.rs index aed250b..6790830 100644 --- a/examples/create_message.rs +++ b/examples/create_message.rs @@ -1,7 +1,9 @@ #[tokio::main] async fn main() -> eyre::Result<()> { - let client: gotify::AppClient = - gotify::Client::new(env!("GOTIFY_URL"), env!("GOTIFY_APP_TOKEN"))?; + let client: gotify::AppClient = gotify::Client::new( + &*std::env::var("GOTIFY_URL")?, + std::env::var("GOTIFY_APP_TOKEN")?, + )?; client .create_message("Lorem ipsum dolor sit amet") diff --git a/examples/websocket.rs b/examples/websocket.rs index 6078342..c58bd21 100644 --- a/examples/websocket.rs +++ b/examples/websocket.rs @@ -2,8 +2,10 @@ use futures_util::StreamExt; #[tokio::main] async fn main() -> eyre::Result<()> { - let client: gotify::ClientClient = - gotify::Client::new(env!("GOTIFY_URL"), env!("GOTIFY_CLIENT_TOKEN"))?; + let client: gotify::ClientClient = gotify::Client::new( + &*std::env::var("GOTIFY_URL")?, + std::env::var("GOTIFY_CLIENT_TOKEN")?, + )?; let mut messages = client.message_stream().await?; while let Some(result) = messages.next().await { let message = result?;