make struct and function public

This commit is contained in:
Rémi Rativel 2023-02-15 16:14:27 +01:00
parent 619b67f7ec
commit 9fab99e31f

View File

@ -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<Section>,
@ -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;