Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix for a possible E0401 error in dependent libs #74

Merged
merged 7 commits into from
Dec 17, 2024

Conversation

robert-affinidi
Copy link
Collaborator

@robert-affinidi robert-affinidi commented Dec 16, 2024

If the library is referenced in another lib (affinidi-did-resolver-cache-sdk = { version = "0.2.2" }) then the compilation error occurs:

❯ cargo build
   Compiling affinidi-did-resolver-cache-sdk v0.2.2
error[E0401]: can't use `Self` from outer item
   --> /.../affinidi-did-resolver-cache-sdk-0.2.2/src/lib.rs:232:54
    |
226 | impl DIDCacheClient {
    | ---- `Self` type implicitly declared here, by this `impl`
...
232 |     pub async fn new(config: ClientConfig) -> Result<Self, DIDCacheError> {
    |                                                      ^^^^
    |                                                      |
    |                                                      use of `Self` from outer item
    |                                                      refer to the type directly here instead
    |
    = note: a `const` is a separate item from the item that contains it

For more information about this error, try `rustc --explain E0401`.
error: could not compile `affinidi-did-resolver-cache-sdk` (lib) due to 1 previous error

@robert-affinidi robert-affinidi merged commit 4b9ed48 into main Dec 17, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants