def _parse_crates()

in src/buildstream_plugins/sources/cargo.py [0:0]


    def _parse_crates(self, refs):

        # Return an empty list for no ref
        if refs is None:
            return []

        return [
            Crate(
                self,
                crate.get_str("name"),
                crate.get_str("version"),
                sha=crate.get_str("sha", None),
            )
            for crate in refs
        ]