Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Move extern crate alloc to prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
deekerno committed Sep 13, 2023
1 parent 985d862 commit a062a9a
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion examples/fuel-explorer/fuel-explorer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
extern crate alloc;
use fuel_indexer_utils::prelude::*;

// TODO: We use a lot of manual type conversion below due to https://github.com/FuelLabs/fuel-indexer/issues/286
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
//! ```bash
//! cargo run -p hello-world-data --bin hello-world-data
//! ```
extern crate alloc;
use fuel_indexer_utils::prelude::*;

#[indexer(
Expand Down
1 change: 0 additions & 1 deletion examples/hello-world/hello-indexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
//! cargo run -p hello-world-data --bin hello-world-data
//! ```
extern crate alloc;
use fuel_indexer_utils::prelude::*;

#[indexer(manifest = "examples/hello-world/hello-indexer/hello_indexer.manifest.yaml")]
Expand Down
1 change: 1 addition & 0 deletions packages/fuel-indexer-macros/src/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ fn native_prelude() -> proc_macro2::TokenStream {

static mut db: Option<Arc<Mutex<Database>>> = None;

extern crate alloc;
use fuel_indexer_utils::plugin::types::*;
use fuel_indexer_utils::plugin::native::*;
use fuel_indexer_utils::plugin::{serde_json, serialize, deserialize, bincode};
Expand Down
1 change: 1 addition & 0 deletions packages/fuel-indexer-macros/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub fn handler_block_wasm(
/// indexer module, not within the scope of the entire lib module.
fn wasm_prelude() -> proc_macro2::TokenStream {
quote! {
extern crate alloc;
use alloc::{format, vec, vec::Vec};
use std::str::FromStr;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate alloc;

use fuel_indexer_utils::prelude::*;

#[indexer(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
extern crate alloc;
use fuel_indexer_utils::prelude::*;

#[indexer(manifest = "packages/fuel-indexer-tests/indexers/simple-wasm/simple_wasm.yaml")]
Expand Down
6 changes: 2 additions & 4 deletions plugins/forc-index/src/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ pub fn default_indexer_lib(
let manifest_path = manifest_path.display();

format!(
r#"extern crate alloc;
use fuel_indexer_utils::prelude::*;
r#"use fuel_indexer_utils::prelude::*;
#[indexer(manifest = "{manifest_path}")]
pub mod {indexer_name}_index_mod {{
Expand Down Expand Up @@ -186,8 +185,7 @@ pub fn default_indexer_binary(
let manifest_path = manifest_path.display();

format!(
r#"extern crate alloc;
use fuel_indexer_utils::prelude::*;
r#"use fuel_indexer_utils::prelude::*;
#[indexer(manifest = "{manifest_path}")]
pub mod {indexer_name}_index_mod {{
Expand Down

0 comments on commit a062a9a

Please sign in to comment.