From 9fab99e31f39d73df97ddd4f5e4ef4a9e58051da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rativel?= Date: Wed, 15 Feb 2023 16:14:27 +0100 Subject: [PATCH] make struct and function public --- src/simulator/mem_cmp.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simulator/mem_cmp.rs b/src/simulator/mem_cmp.rs index abddae9..3e2ccd6 100644 --- a/src/simulator/mem_cmp.rs +++ b/src/simulator/mem_cmp.rs @@ -82,7 +82,7 @@ impl Section{ /* * Representation de l'etat de la mémoire (apres execution.... a confirmer), sous forme de sections */ -struct Mem_Checker{ +pub struct Mem_Checker{ pc: usize, sp: usize, sections: Vec
, @@ -91,7 +91,7 @@ struct Mem_Checker{ impl Mem_Checker{ - fn from(path: &String) -> Mem_Checker { + pub fn from(path: &String) -> Mem_Checker { let file = fs::File::open("test_file_section.txt").expect("Wrong filename"); let reader = io::BufReader::new(file); @@ -151,7 +151,7 @@ impl Mem_Checker{ } - fn fill_memory_from_Mem_Checker(m_c: &Mem_Checker, machine: &mut Machine){ + pub fn fill_memory_from_Mem_Checker(m_c: &Mem_Checker, machine: &mut Machine){ machine.sp = m_c.sp; machine.pc = m_c.pc as u64;