File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ impl LeetCode {
25
25
impl LeetCode < Unauthorized > {
26
26
/// # Authenticate with cookie
27
27
/// Builds a new reqwest client with the cookie
28
- pub fn authenticate ( & mut self , cookie : & str ) -> Result < LeetCode < Authorized > , & str > {
28
+ pub fn authenticate ( & self , cookie : & str ) -> Result < LeetCode < Authorized > , & str > {
29
29
let mut headers = reqwest:: header:: HeaderMap :: with_capacity ( 5 ) ;
30
30
let Some ( csrf_token) = cookie
31
31
. split ( ';' )
Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ fn main() -> ExitCode {
80
80
return ExitCode :: FAILURE ;
81
81
} ;
82
82
83
- let mut leetcode = LeetCode :: new ( ) ;
84
- let lc = leetcode . authenticate ( cookie) . unwrap ( ) ;
83
+ let lc = LeetCode :: new ( ) ;
84
+ let lc = lc . authenticate ( cookie) . unwrap ( ) ;
85
85
86
86
if let None = cli. command {
87
87
println ! (
You can’t perform that action at this time.
0 commit comments