IntelliJ - Rust - Dependency recognized on Cargo.toml but not while writing code
Hi there,
When creating a cosmwasm project using cw-utils, its content is not accessible while writing code.
After adding the dependency in the Cargo.toml file, is there anything else that must be done to be able to automatically access its code while coding on any of the project files?
Please find below an excerpt of the related code:
Cargo.toml
[dependencies]
cosmwasm-std = "1.0.0"
cosmwasm-storage = "1.1.1"
cw-storage-plus = "0.15.0"
cw2 = "0.15.0"
schemars = "0.8.10"
serde = { version = "1.0.144", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.31" }
cw-utils = "0.14.0"
contract.rs
...
use cw_utils::parse_instantiate_response_data;
....
let resp = parse_instantiate_response_data(&data)
.map_err(|error| ContractError::CustomError {val:error.to_string()})?;
The function parse_instantiate_response_data is not recognized by IntelliJ, and it should be as it is part of cw-utils.
Any help would be greatly appreciated.
Thanks in advance,
Blas.
Please sign in to leave a comment.
This one was easy to fix. A simple reboot of the IntelliJ.
After adding a dependency to cargo.toml, the automatic code suggestions for that crate was not available until reboot.