Right now the only public method to construct a crate is Crate::new, which requires a filename. However if the file is stored in a git compressed packfile, it may not have its own filename (see https://github.com/rust-lang/docs.rs/pull/898#discussion_r461501149). Since Crate::new trivially calls Crate::from_slice after, is it possible to expose that as a public method?
Right now the only public method to construct a crate is
Crate::new
, which requires a filename. However if the file is stored in a git compressed packfile, it may not have its own filename (see https://github.com/rust-lang/docs.rs/pull/898#discussion_r461501149). SinceCrate::new
trivially callsCrate::from_slice
after, is it possible to expose that as a public method?cc @nemo157