lucab / libsystemd-rs

A pure-Rust client library to work with systemd
https://crates.io/crates/libsystemd
Other
106 stars 19 forks source link

logging: fix typo in connected_to_journal docs #137

Closed dfreese closed 1 year ago

swsnr commented 1 year ago

I don't mind either way, so I'd leave this for @lucab to review.

lucab commented 1 year ago

Oh well, this is mostly a matter of taste and styles. I personally wrote initially this function in the non-functional way that you are now proposing again, but @swsnr preferred the map_or() so we settled on that. There is no absolute better form, but the current one avoids early-returns and rightward drift. In the spirit of not touching code that doesn't need to be fixed, I'd suggest to only address the typo in this PR.

dfreese commented 1 year ago

In the spirit of not touching code that doesn't need to be fixed, I'd suggest to only address the typo in this PR.

Done

swsnr commented 1 year ago

Thanks. I allowed myself to merge this right away 😇