From a9189f18b5b2fafab8507b1decafa71bda75017b Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Tue, 10 Dec 2024 00:28:29 +0800 Subject: [PATCH] add path --- vm/framework/move-stdlib/src/lib.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/vm/framework/move-stdlib/src/lib.rs b/vm/framework/move-stdlib/src/lib.rs index e4a0ecf16e..cdbf67cb3d 100644 --- a/vm/framework/move-stdlib/src/lib.rs +++ b/vm/framework/move-stdlib/src/lib.rs @@ -19,7 +19,7 @@ pub static MOVE_STDLIB_SOURCE_FILES: Lazy> = Lazy::new(|| { .extract(sources_dir.as_path()) .expect("extract should success"); info!("restore move-stdlib sources in: {:?}", sources_dir); - let files = MOVE_STDLIB_SOURCES_DIR + let files: Vec = MOVE_STDLIB_SOURCES_DIR .files() .iter() .filter_map(|file| { @@ -36,6 +36,15 @@ pub static MOVE_STDLIB_SOURCE_FILES: Lazy> = Lazy::new(|| { }) .collect(); files + .iter() + .filter_map(|file| { + if !file.ends_with("spec.move") { + Some(file.clone()) + } else { + None + } + }) + .collect() }); pub const STARCOIN_STDLIB_SOURCES_DIR: Dir = include_dir!("../starcoin-stdlib/sources"); @@ -48,7 +57,7 @@ pub static STARCOIN_STDLIB_SOURCE_FILES: Lazy> = Lazy::new(|| { .extract(sources_dir.as_path()) .expect("extract should success"); info!("restore starcoin-stdlib sources in: {:?}", sources_dir); - let files = STARCOIN_STDLIB_SOURCES_DIR + let files: Vec = STARCOIN_STDLIB_SOURCES_DIR .files() .iter() .filter_map(|file| { @@ -65,6 +74,15 @@ pub static STARCOIN_STDLIB_SOURCE_FILES: Lazy> = Lazy::new(|| { }) .collect(); files + .iter() + .filter_map(|file| { + if !file.ends_with("spec.move") { + Some(file.clone()) + } else { + None + } + }) + .collect() }); pub mod natives;