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

Example code fails #14

Closed
patrickgill opened this issue Nov 10, 2023 · 3 comments
Closed

Example code fails #14

patrickgill opened this issue Nov 10, 2023 · 3 comments

Comments

@patrickgill
Copy link

I get 2 errors with the example code from README. I'm using the code in a new crate project.

error[E0603]: struct `Image` is private
 --> src/main.rs:1:19
  |
1 | use exfat::image::Image;
  |                   ^^^^^ private struct
  |
note: the struct `Image` is defined here
 --> /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/exfat-0.1.0/src/image.rs:7:1
  |
7 | pub(crate) struct Image<R: Read + Seek> {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type `Root`
 --> src/main.rs:9:16
  |
9 |     let root = Root::open(image).expect("cannot open the root directory");
  |                ^^^^ use of undeclared type `Root`

Does the library need to be changed, or is it the example code?
Advice is appreciated

@ultimaweapon
Copy link
Member

Thanks for reporting. Yeah it is outdated. Please see the example in the tests folder instead.

@ultimaweapon
Copy link
Member

Wait, it seems like you are using v0.1.0, which is incompatible with the example in the README here.

@ultimaweapon
Copy link
Member

For v0.1.0 please use this instead:

for item in ExFat::open(file).unwrap() {}

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

No branches or pull requests

2 participants