Error Importing icm20948-async Crate

Hello everyone,

I tried building it and checking


the icm20948-async crate from crates.io to use it in my code, but I keep encountering an error. Can anyone explain what this error relates to and how I can fix it?

Thank you for your help!

That crate uses unstable Rust features and can only be built using nightly Rust (cargo +nightly build).

Thank you so much for answering my question! I've imported the nightly version and tried to build it again, but I'm still getting the same error. How can I fix it?

The error message is telling us exactly what is wrong: you're importing DelayUs but there is no DelayUs, there is only DelayNs.

Please use the API docs to find identifiers. For example, you can type "Delay" in the search box to see what is available.

Please do not post images containing code or errors. Post code and errors as text that is copy-pasted into the forum message. Many people cannot read code in images, and there is no way to copy-paste from it. On this forum code is pasted inside two lines containing triple backticks ``` as described here.

If you need more detailed help with your code, you'll need to post both the code and the error message. It is often useful to put a reproducible problem in the Rust playground. You share it by clicking the Share button. Then click the icon next to "Permalink to the playground", which copies the URL to the clipboard. Then paste the URL into the forum message.

3 Likes

Understood it completely :slight_smile: , thank you so much for pointing out these mistakes. I'm still new to this kind of community, so I really appreciate your guidance. Thanks again for your help, sir! :innocent: :pray:

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.