-
Notifications
You must be signed in to change notification settings - Fork 268
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
Improve getting started code example #875
Comments
You linked to the SDK's latest git main documentation, but the dependency is on the 0.5 crates.io release. Please refer to its docs at docs.rs instead, or use a git dependency. |
Thank you for your answer! You are right, there is a version mismatch.
|
Yeah
I've been meaning to move the examples out of |
closing as the main issues has been addressed and solved. |
Created a new issue about making the examples their own crates: #880 |
Describe the bug
When I copy paste the "Getting started" Code to a fresh rust project it does not compile.
Other Crates have documentation what modules need to be imported in order to use the example, this one does not.
The compiler says use std::convert::TryFrom; is a unnecessary Import.
To Reproduce
Go to https://matrix-org.github.io/matrix-rust-sdk/matrix_sdk/index.html and copy the code.
Create a new Project with
cargo new xyz
Paste Code to main.rs
Run
cargo run
My Cargo.toml:
My src/main.rs
Expected behavior
Clear documentation on necessary Imports and a working example without unused imports.
Desktop (please complete the following information):
Additional context
I am new to Rust and this SDK so maybe there are simple answers. Please be kind in your answers.
I opened this Issue to give you a perspective what would be helpful for me as a beginner.
The text was updated successfully, but these errors were encountered: