MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / _rust_toolchain

Function _rust_toolchain

pre_commit/languages/rust.py:43–48  ·  view source on GitHub ↗

Transform the language version into a rust toolchain version.

(language_version: str)

Source from the content-addressed store, hash-verified

41
42
43def _rust_toolchain(language_version: str) -> str:
44 """Transform the language version into a rust toolchain version."""
45 if language_version == C.DEFAULT:
46 return 'stable'
47 else:
48 return language_version
49
50
51def get_env_patch(target_dir: str, version: str) -> PatchesT:

Callers 2

get_env_patchFunction · 0.85
install_environmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected