This fixes a bug where the fix for #41 was...not correct, and would erroneously prune out optional dependencies if the feature that brought them in did not exactly match their name, which was somehow a case I didn't run across testing.
The bug was that since both wasmtime-cranelift and rayon were marked as optional, the code would attempt to locate wasmtime-cranelift in the features and fail, so now it properly looks to see if the any of the enabled features have subfeatures that enable the exact package id, getting rid of the broken name comparison.
This also adds Krate::direct_dependencies for the same reason as having direct_dependents
This fixes a bug where the fix for #41 was...not correct, and would erroneously prune out optional dependencies if the feature that brought them in did not exactly match their name, which was somehow a case I didn't run across testing.
This can be seen in, for example, wasmtime.
The bug was that since both
wasmtime-cranelift
andrayon
were marked as optional, the code would attempt to locatewasmtime-cranelift
in the features and fail, so now it properly looks to see if the any of the enabled features have subfeatures that enable the exact package id, getting rid of the broken name comparison.This also adds
Krate::direct_dependencies
for the same reason as havingdirect_dependents