]> git.bitcoin.ninja Git - ldk-c-bindings/commit
Use `GenericTypes`'s type resolver instead of re-resolving
authorMatt Corallo <git@bluematt.me>
Wed, 22 Sep 2021 06:04:50 +0000 (06:04 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 23 Sep 2021 19:30:48 +0000 (19:30 +0000)
commit19ebe5e21418685c3393e788a4af576830b983e7
treef008944e3f33d0214167f832239c41ea3318fb4e
parentbd76083ef39691612107fca226bad84498fc3396
Use `GenericTypes`'s type resolver instead of re-resolving

When we resolve a type with `GenericTypes::maybe_resolve_path` it
returns a resolved-path string as well as a syn::Path. When
resolving we'd previously then re-resolve the Path with the current
type/import information, instead of just accepting what was already
resolved. Simply accepting what was already resolved not only
simplifies a few cases, but also allows us to clean up where the
"crate::" prefix is printed, keeping "crate::" prefixes out of all
type resolution.
c-bindings-gen/src/blocks.rs
c-bindings-gen/src/types.rs