Selaa lähdekoodia

Allow procedural macro coupling

Armani Ferrante 4 vuotta sitten
vanhempi
sitoutus
09ed7f670d
3 muutettua tiedostoa jossa 2 lisäystä ja 6 poistoa
  1. 0 3
      src/ctor.rs
  2. 0 3
      src/idl.rs
  3. 2 0
      src/lib.rs

+ 0 - 3
src/ctor.rs

@@ -2,9 +2,6 @@ use crate::{Accounts, Sysvar};
 use solana_program::account_info::AccountInfo;
 use solana_program::sysvar::rent::Rent;
 
-// Needed for the `Accounts` macro.
-use crate as anchor_lang;
-
 // The Ctor accounts that can be used to create any account within the program
 // itself (instead of creating the account on the client).
 //

+ 0 - 3
src/idl.rs

@@ -16,9 +16,6 @@
 use crate::prelude::*;
 use solana_program::pubkey::Pubkey;
 
-// Needed for the `Accounts` macro.
-use crate as anchor_lang;
-
 // The first 8 bytes of an instruction to create or modify the IDL account. This
 // instruction is defined outside the main program's instruction enum, so that
 // the enum variant tags can align with function source order.

+ 2 - 0
src/lib.rs

@@ -21,6 +21,8 @@
 //!
 //! Presented here are the Rust primitives for building on Solana.
 
+extern crate self as anchor_lang;
+
 use solana_program::account_info::AccountInfo;
 use solana_program::instruction::AccountMeta;
 use solana_program::program_error::ProgramError;