~vpzom/lotide

2 2

[PATCH 1/4] Cleanup: Return value from server awaiting

Details
Message ID
<20210108190903.28930-2-mail@beyermatthias.de>
DKIM signature
missing
Download raw message
Patch: +1 -3
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
---
 src/main.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index e757cc4..07391de 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -230,7 +230,5 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
        }),
    );

    server.await?;

    Ok(())
    server.await.map_err(From::from)
}
-- 
2.29.2
Details
Message ID
<ef3734f3-79b3-7b6b-ef36-adcf9ac2b9ef@vpzom.click>
In-Reply-To
<20210108190903.28930-2-mail@beyermatthias.de> (view parent)
DKIM signature
missing
Download raw message
> -    server.await?;
> -
> -    Ok(())
> +    server.await.map_err(From::from)
>  }
Hmm, I'm not sure what I think about this. I used the Ok(()) here to
avoid explicitly writing error conversion
Details
Message ID
<11670948.O9o76ZdvQC@hoshi>
In-Reply-To
<ef3734f3-79b3-7b6b-ef36-adcf9ac2b9ef@vpzom.click> (view parent)
DKIM signature
missing
Download raw message
Am Samstag, 9. Januar 2021, 00:49:33 CET schrieb Colin Reeder:
> Hmm, I'm not sure what I think about this. I used the Ok(()) here to
> avoid explicitly writing error conversion

Well okay... feel free to skip any patch you don't like of course! :-)
I guess they should apply without eachother!  :-)
Reply to thread Export thread (mbox)