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

Requires parking_lot to be manually imported #1

Closed
askonomm opened this issue Jan 1, 2022 · 5 comments
Closed

Requires parking_lot to be manually imported #1

askonomm opened this issue Jan 1, 2022 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@askonomm
Copy link

askonomm commented Jan 1, 2022

Great library! One thing I noticed when implementing this to my project was that the documentation says to just import the throttle_my_fn::throttle; but actually need to also import add parking_lot to dependencies and import it because this library itself is not doing that.

@fredmorcos
Copy link
Owner

fredmorcos commented Jan 1, 2022

Thank you for the report!

I updated the documentation to mention that parking_lot needs to be added to the dependencies section of the Cargo.toml file.

However, I am not sure what you mean by

and import it because this library itself is not doing that

Could you tell me what you needed to do to get this crate to work for you?

Thank you!

@fredmorcos fredmorcos self-assigned this Jan 1, 2022
@askonomm
Copy link
Author

askonomm commented Jan 2, 2022

I meant that I needed to

  1. Add parking_lot to Cargo.toml (you already updated the documentation about this so all good)
  2. Add use parking_lot; to my own program (currently your documentation doesn't reflect this)

@fredmorcos
Copy link
Owner

Can you try getting your program to build without use parking_lot? I wrote a test program and it works without it. The macro imports parking_lot::{Mutex, const_mutex}.

@fredmorcos
Copy link
Owner

Do you consider this now fixed? Is it OK for you that I mark this issue as fixed?

@fredmorcos
Copy link
Owner

Fixed by c00cd68

@fredmorcos fredmorcos added the documentation Improvements or additions to documentation label Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants