Skip to content

Commit 1e81974

Browse files
committed
refactor(config): removing useless legacy fn
1 parent 5f3b3f1 commit 1e81974

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

src/config.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::{
22
fs,
33
io::{
44
self,
5-
Error,
65
},
76
path::PathBuf,
87
};
@@ -68,25 +67,12 @@ impl RuntimeConfigSetup {
6867
if parsed_config.leetcode_dir_path.is_some() {
6968
self.config.leetcode_dir_path = parsed_config.leetcode_dir_path;
7069
}
71-
self.check_token()?;
7270
} else {
7371
self.create_config_file();
7472
}
7573
Ok(())
7674
}
7775

78-
fn check_token(&mut self) -> Result<bool, io::Error> {
79-
if !self.config.leetcode_token.is_empty() {
80-
return Ok(true);
81-
}
82-
println!("No Leetcode token found.");
83-
Err(Error::new(
84-
io::ErrorKind::NotFound,
85-
"Leetcode token not found. Please set it in the config file \
86-
following readme instructions.",
87-
))
88-
}
89-
9076
/// Resolve the configured LeetCode directory, expand ~, canonicalize, and
9177
/// create if missing.
9278
pub fn resolve_leetcode_dir(&self) -> io::Result<PathBuf> {

0 commit comments

Comments
 (0)