我试图编译新的托盘。
我运行命令:
货物运行 -- --dev --tmp
我在终端中收到此错误:
error[E0433]: failed to resolve: use of undeclared type or module `sp_std`
--> pallets/template/src/lib.rs:7:5
|
7 | use sp_std::vec::Vec;
| ^^^^^^ use of undeclared type or module `sp_std`
我在 cargo.toml 文件中添加了必要的代码:
[dev-dependencies]
sp-core = { default-features = false, version = '2.0.0' }
sp-io = { default-features = false, version = '2.0.0' }
sp-runtime = { default-features = false, version = '2.0.0' }
sp-std = { default-features = false, version = '2.0.0' }
[features]
default = ['std']
std = [
'codec/std',
'frame-support/std',
'frame-system/std',
'sp-std/std',
]
我不确定为什么它不编译。