summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-08-01 15:23:54 +0200
committermo8it <mo8it@proton.me>2024-08-01 15:23:54 +0200
commitc7590dd752ab35d06a85f016e88921f10934e6aa (patch)
tree0ab9fa0aae23cfe752c3aa67b70c7451c1eb3a65 /src/main.rs
parent33a56803281ec4ec84fbe61919e9c825f1f446f7 (diff)
Improve the runner
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/main.rs b/src/main.rs
index 658d551..1f0afde 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,22 +24,6 @@ mod terminal_link;
mod watch;
const CURRENT_FORMAT_VERSION: u8 = 1;
-const DEBUG_PROFILE: bool = {
- #[allow(unused_assignments, unused_mut)]
- let mut debug_profile = false;
-
- #[cfg(debug_assertions)]
- {
- debug_profile = true;
- }
-
- debug_profile
-};
-
-// The current directory is the official Rustligns repository.
-fn in_official_repo() -> bool {
- Path::new("dev/rustlings-repo.txt").exists()
-}
fn clear_terminal(stdout: &mut StdoutLock) -> io::Result<()> {
stdout.write_all(b"\x1b[H\x1b[2J\x1b[3J")
@@ -89,7 +73,7 @@ enum Subcommands {
fn main() -> Result<()> {
let args = Args::parse();
- if !DEBUG_PROFILE && in_official_repo() {
+ if cfg!(not(debug_assertions)) && Path::new("dev/rustlings-repo.txt").exists() {
bail!("{OLD_METHOD_ERR}");
}