oras-project / rust-oci-client

A Rust crate to interact with OCI registries
Apache License 2.0
90 stars 47 forks source link

Higher-ranked lifetime error workaround #90

Closed linyinfeng closed 1 year ago

linyinfeng commented 1 year ago

Workaround to a known issue of rustc: https://github.com/rust-lang/rust/issues/104382.

I encountered this issue when using this library with https://github.com/seanmonstar/warp. The error propagated from oci-distribution into my crate, outputting two hundred lines of error messages. Here is the horrible error messages from my project (https://github.com/linyinfeng/oranc/pull/24/commits/d9076872dbb26a39d167ddff88cd9e04df44a7d4, cargo.log).

After some bisect, debug, and search, I found that it is a known issue of rustc, and the workaround is simple.

flavio commented 1 year ago

Thanks for the fix!