parameters: (self)
return_statement: return "\n".join(config)
docstring: Returns a configuration to be put inside root Cargo.toml file which
          patches the dependencies git code with local getdeps versions.
          See https://doc.rust-lang.org/cargo/reference/manifest.html#the-patch-section
docstring_summary: Returns a configuration to be put inside root Cargo.toml file which
          patches the dependencies git code with local getdeps versions.
          See https://doc.rust-lang.org/cargo/reference/manifest.html#the-patch-section
docstring_tokens: Returns a configuration to be put inside root Cargo . toml file which patches the dependencies git code with local getdeps versions . See https : // doc . rust - lang . org / cargo / reference / manifest . html#the - patch - section
function: def _resolve_config(self):
          """
          Returns a configuration to be put inside root Cargo.toml file which
          patches the dependencies git code with local getdeps versions.
          See https://doc.rust-lang.org/cargo/reference/manifest.html#the-patch-section
          """
          dep_to_git = self._resolve_dep_to_git()
          dep_to_crates = CargoBuilder._resolve_dep_to_crates(
              self.build_source_dir(), dep_to_git
          )
  
          config = []
          for name in sorted(dep_to_git.keys()):
              git_conf = dep_to_git[name]
              crates = sorted(dep_to_crates.get(name, []))
              if not crates:
                  continue  # nothing to patch, move along
              crates_patches = [
                  '{} = {{ path = "{}" }}'.format(
                      crate,
                      CargoBuilder._resolve_crate_to_path(crate, git_conf).replace(
                          "\\", "\\\\"
                      ),
                  )
                  for crate in crates
              ]
  
              config.append(
                  '[patch."{0}"]\n'.format(git_conf["repo_url"])
                  + "\n".join(crates_patches)
              )
          return "\n".join(config)
function_tokens: def _resolve_config ( self ) : dep_to_git = self . _resolve_dep_to_git ( ) dep_to_crates = CargoBuilder . _resolve_dep_to_crates ( self . build_source_dir ( ) , dep_to_git ) config = [ ] for name in sorted ( dep_to_git . keys ( ) ) : git_conf = dep_to_git [ name ] crates = sorted ( dep_to_crates . get ( name , [ ] ) ) if not crates : continue # nothing to patch, move along crates_patches = [ '{} = {{ path = "{}" }}' . format ( crate , CargoBuilder . _resolve_crate_to_path ( crate , git_conf ) . replace ( "\\" , "\\\\" ) , ) for crate in crates ] config . append ( '[patch."{0}"]\n' . format ( git_conf [ "repo_url" ] ) + "\n" . join ( crates_patches ) ) return "\n" . join ( config )