Not sure if this is rusfst's fault or something inherent to the Rust language, but I really don't feel like it should be necessary to write a straightforward compose operation this way (https://github.com/dhdaines/rustfst-g2p/blob/main/src/g2p.rs#L148):
// fst and self.model are both VectorFst<TropicalWeight>
let fst: VectorFst<TropicalWeight> = compose::<
TropicalWeight,
VectorFst<TropicalWeight>,
VectorFst<TropicalWeight>,
_,
_,
_,
>(fst, &self.model)?;
Is there something that can be done to make rustc properly infer types W, F1, and F2?
Not sure if this is rusfst's fault or something inherent to the Rust language, but I really don't feel like it should be necessary to write a straightforward compose operation this way (https://github.com/dhdaines/rustfst-g2p/blob/main/src/g2p.rs#L148):
Is there something that can be done to make
rustcproperly infer typesW,F1, andF2?