Closed ecashin closed 1 year ago
I think it would be more conventional to have the example usage inside of main
moved instead into an examples
directory, but this branch makes minimal changes.
Hi @ecashin, thank you very much for bringing that up!
I've made the changes and when running cargo test I'm getting the following error message:
Doc-tests rusty-tesseract error[E0659]: rusty_tesseract` is ambiguous (name vs any other name during import resolution)
--> /home/thomas/Documents/Github/rusty-tesseract/src/lib.rs:5:9 |
5 | pub use rusty_tesseract::*; | ^^^^^^^^^^^^^^^ ambiguous name |
---|
= note: rusty_tesseract
could refer to a crate passed with --extern
= help: use ::rusty_tesseract
to refer to this crate unambiguously
note: rusty_tesseract
could also refer to the module defined here
--> /home/thomas/Documents/Github/rusty-tesseract/src/lib.rs:2:1
|
2 | mod rusty_tesseract;
| ^^^^^^^^^^^^^^^^^^^^
= help: use crate::rusty_tesseract
to refer to this module unambiguously
error: aborting due to previous error
For more information about this error, try rustc --explain E0659
.
error: test failed, to rerun pass '--doc'`
Apparently line 5 of lib.rs is causing the issue. If you change the line from pub use rusty_tesseract::*;
to pub use crate::rusty_tesseract::*;
it seems to work. Would you mind changing/testing on your end too, then I can merge the PR.
Thanks,
Thomas
Hi, I made the change you suggested, but cargo test
fails with other problems. I think I'm going to close this pull request and try something else for my application. Thanks for your attention.
I was able to build my trial program by adding a
path
dependency to my fork ofrusty-tesseract
and adding thislib.rs
re-exporter.