File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed
Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1+ ## v0.2.22
2+ + Fixed the cache can't update with new added problems
3+
4+ + Display user friendly errors when pick/edit new added problem.
5+
6+ + upgrade pyo3
7+
8+ + fix leetcode list with empty cache
9+
110## v0.2.21
211
312+ Make programmable support to be an advanced feature
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ path = "src/bin/lc.rs"
44
55[package ]
66name = " leetcode-cli"
7- version = " 0.2.21 "
7+ version = " 0.2.22 "
88authors = [" clearloop <cdr.today@foxmail.com>" ]
99edition = " 2018"
1010description = " Leet your code in command-line."
Original file line number Diff line number Diff line change @@ -94,8 +94,6 @@ impl Cache {
9494 }
9595
9696 /// Get problems from cache
97- ///
98- /// if cache doesn't exist, request a new copy
9997 pub fn get_problems ( & self ) -> Result < Vec < Problem > , Error > {
10098 Ok ( problems. load :: < Problem > ( & self . conn ( ) ?) ?)
10199 }
Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ impl Command for ListCommand {
126126 let cache = Cache :: new ( ) ?;
127127 let mut ps = cache. clone ( ) . get_problems ( ) ?;
128128
129+ // if cache doesn't exist, request a new copy
129130 if ps. is_empty ( ) {
131+ cache. clone ( ) . download_problems ( ) ?;
130132 return Self :: handler ( m) ;
131133 }
132134
Original file line number Diff line number Diff line change 2828//! **Please make sure you have logined in `leetcode.com` with `chrome`**, more info plz checkout [this](#cookies)
2929//!
3030//! ```sh
31- //! leetcode 0.2.21
31+ //! leetcode 0.2.22
3232//! May the Code be with You 👻
3333//!
3434//! USAGE:
You can’t perform that action at this time.
0 commit comments