File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 > {
You can’t perform that action at this time.
0 commit comments