Change trailers() to return Result<Option> instead of Option<Result>
This commit is contained in:
@@ -46,8 +46,8 @@ pub async fn main() -> Result<(), Box<dyn Error>> {
|
||||
println!("GOT CHUNK = {:?}", chunk?);
|
||||
}
|
||||
|
||||
if let Some(trailers) = body.trailers().await {
|
||||
println!("GOT TRAILERS: {:?}", trailers?);
|
||||
if let Some(trailers) = body.trailers().await? {
|
||||
println!("GOT TRAILERS: {:?}", trailers);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user