diff options
| author | Mo <76752051+mo8it@users.noreply.github.com> | 2024-04-25 14:43:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-25 14:43:28 +0200 |
| commit | 88f27a53771a49a4e541627b84cc5dc7ab6f7357 (patch) | |
| tree | eba5401fd370e85cf597771b34a042eb5ae65475 /src/main.rs | |
| parent | d8c2ab8349854cbc7f4a994c7413d266cc38bc24 (diff) | |
| parent | 1f1a62d83ef9398a1a31c904a2ef6d81f5455e59 (diff) | |
Merge pull request #1959 from rust-lang/output
Improve output
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 790fff6..a928504 100644 --- a/src/main.rs +++ b/src/main.rs @@ -75,10 +75,14 @@ enum Subcommands { Dev(DevCommands), } +fn in_official_repo() -> bool { + Path::new("dev/rustlings-repo.txt").exists() +} + fn main() -> Result<()> { let args = Args::parse(); - if !DEBUG_PROFILE && Path::new("dev/rustlings-repo.txt").exists() { + if !DEBUG_PROFILE && in_official_repo() { bail!("{OLD_METHOD_ERR}"); } |
