mirror of
https://github.com/Diggsey/sqlxmq.git
synced 2024-05-31 23:48:12 +00:00
Fix readme example
There was `serde_json::Error`
This commit is contained in:
parent
bca15c561c
commit
6cc5750fe0
|
@ -134,7 +134,7 @@ async fn example_job(
|
|||
message: &'static str,
|
||||
) -> sqlx::Result<()> {
|
||||
// Decode a JSON payload
|
||||
let who: Option<String> = current_job.json()?;
|
||||
let who: Option<String> = current_job.json().unwrap_or_default();
|
||||
|
||||
// Do some work
|
||||
println!("{}, {}!", message, who.as_deref().unwrap_or("world"));
|
||||
|
|
Loading…
Reference in a new issue