rust-错误[E0412]:在此范围内找不到类型“ProgramResult”
发布时间:2022-04-09 01:37:11 532
相关标签: # scala
use anchor_lang::prelude::*;
declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");
#[program]
pub mod myepicproject {
use super::*;
pub fn start_stuff_off(ctx: Context) -> ProgramResult {
Ok(())
}
}
#[derive(Accounts)]
pub struct StartStuffOff {}
我有上面的源代码和下面的错误。
error[E0412]: cannot find type `ProgramResult` in this scope
--> programs/myepicproject/src/lib.rs:8:58
|
8 | pub fn start_stuff_off(ctx: Context) -> ProgramResult {
| ^^^^^^^^^^^^^ not found in this scope
For more information about this error, try `rustc --explain E0412`.
error: could not compile `myepicproject` due to previous error
有什么建议吗?
使用锚
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报