Skip to content

Commit

Permalink
Fix clippy CI job & make examples buildable
Browse files Browse the repository at this point in the history
  • Loading branch information
d-k-bo committed Aug 27, 2023
1 parent f43ed67 commit 2936e32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions examples/create_message.rs
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
6 changes: 4 additions & 2 deletions examples/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down

0 comments on commit 2936e32

Please sign in to comment.