pub fn read_all_programs(&self) -> Result<Vec<Program>> {
        let mut r = vec![];
        for path in self.get_program_list("programs".into())? {
            let idl = anchor_syn::idl::file::parse(path.join("src/lib.rs"))?;
            let lib_name = extract_lib_name(&path.join("Cargo.toml"))?;
            r.push(Program {
                lib_name,
                path,
                idl,
            });
        }
        Ok(r)
    }
// TODO: this should read idl dir instead of parsing source.
this should read idl dir instead of parsing source.
this should read idl dir instead of parsing source .
pub fn read_all_programs(&self) -> Result<Vec<Program>> {
        let mut r = vec![];
        for path in self.get_program_list("programs".into())? {
            let idl = anchor_syn::idl::file::parse(path.join("src/lib.rs"))?;
            let lib_name = extract_lib_name(&path.join("Cargo.toml"))?;
            r.push(Program {
                lib_name,
                path,
                idl,
            });
        }
        Ok(r)
    }
pub fn read_all_programs ( & self ) -> Result < Vec < Program > > { let mut r = vec ! [ ] ; for path in self . get_program_list ( " " . into ( ) ) ? { let idl = anchor_syn :: idl :: file :: parse ( path . join ( " " ) ) ? ; let lib_name = extract_lib_name ( & path . join ( " " ) ) ? ; r . push ( Program { lib_name , path , idl , } ) ; } Ok ( r ) }
TODO: this should read idl dir instead of parsing source.
TODO : this should read idl dir instead of parsing source .
&self