fix: replace unwrap/expect in production paths with fallible alternatives
This commit is contained in:
@@ -203,7 +203,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
transport.max_idle_timeout(Some(
|
||||
std::time::Duration::from_secs(300)
|
||||
.try_into()
|
||||
.expect("300s is a valid IdleTimeout"),
|
||||
.map_err(|e| anyhow::anyhow!("idle timeout: {e}"))?,
|
||||
));
|
||||
transport.max_concurrent_bidi_streams(1u32.into());
|
||||
transport.max_concurrent_uni_streams(0u32.into());
|
||||
@@ -390,7 +390,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
transport.max_idle_timeout(Some(
|
||||
std::time::Duration::from_secs(120)
|
||||
.try_into()
|
||||
.expect("120s is valid"),
|
||||
.map_err(|e| anyhow::anyhow!("idle timeout: {e}"))?,
|
||||
));
|
||||
qc.transport_config(Arc::new(transport));
|
||||
Some(qc)
|
||||
|
||||
Reference in New Issue
Block a user