From: Josh Steadmon Date: Thu, 08 Aug 2024 17:23:27 GMT Subject: Re: [RFC PATCH 3/6] contrib/cgit-rs: introduce Rust wrapper for libgit.a Message-ID: <33jdrobowiv25qk3cfjctozeemtyox4ywlj33dqnhcjnua6n36@alzbo7hjbbll> In-Reply-To: <20240808001743.4sx32gbjtypq3rje@glandium.org> On 2024.08.08 09:17, Mike Hommey wrote: > On Wed, Aug 07, 2024 at 04:29:54PM -0700, Josh Steadmon wrote: > > > You might as well use `dst.display()`. > > > > Wouldn't that fail silently in the event that the path is non-UTF-8? I > > think I'd prefer to explicitly fail in that case, even if it seems > > unlikely. > > That's the theory, unfortunately, reality is that even the most central > Rust crates don't care: > https://github.com/rust-lang/cc-rs/blob/main/src/lib.rs#L1357-L1360 > > Even better, last time I tried, cargo or rustc (I don't remember which > one it was) would blatantly fail to work if the path is not UTF-8 in the > first place. > > Mike Thanks for the pointers. Fixed in V2.