Skip to content

Commit 463dd8f

Browse files
authored
Update documentation and example (close #59) (#60)
1 parent 40febe4 commit 463dd8f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ reference [this excellent document.](https://web.dev/notifications/)
1212

1313
## Requirements
1414

15-
Clients require an async executor. System Openssl is needed for compilation.
15+
- Clients require an async executor.
16+
- OpenSSL is required for compilation. You must install it on your host or use the `vendored` feature of the [openssl](https://docs.rs/openssl/) crate.
1617

1718
## Migration notes
1819

@@ -24,7 +25,6 @@ Example
2425

2526
```rust
2627
use web_push::*;
27-
use web_push::clients::isahc_client::IsahcWebPushClient;
2828
use std::fs::File;
2929

3030
#[tokio::main]

examples/simple_send.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>
8282

8383
let client = IsahcWebPushClient::new()?;
8484

85-
let response = client.send(builder.build()?).await?;
86-
println!("Sent: {:?}", response);
85+
let result = client.send(builder.build()?).await;
86+
87+
if let Err(error) = result {
88+
println!("An error occured: {:?}", error);
89+
}
8790

8891
Ok(())
8992
}

0 commit comments

Comments
 (0)