Skip to content

Commit 61d71b2

Browse files
committed
updated dependencies
Signed-off-by: dvishal485 <dvishal485@gmail.com>
1 parent f7e3d45 commit 61d71b2

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "leetcode-runner-cli"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
edition = "2021"
55

66
[dependencies]
7-
clap = { version = "4.1.11", features = ["derive"] }
7+
clap = { version = "4.2.1", features = ["derive"] }
88
colored = "2.0.0"
9-
reqwest ={version = "0.11.15", features=["blocking", "json"]}
10-
serde = {version="1.0.158", features=["derive"]}
11-
serde_json = "1.0.94"
9+
reqwest ={version = "0.11.16", features=["blocking", "json"]}
10+
serde = {version="1.0.159", features=["derive"]}
11+
serde_json = "1.0.95"

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,32 @@ leetcode-runner-cli [FLAGS] [OPTIONS <option>]
5050
| `-V, --version` | Prints version information | - |
5151
| `-a, auth` | Authenticate with leetcode | - |
5252
| `-d, daily` | Fetch daily challenge question | - |
53-
| `-q, question` | Question title to fetch | [question_title] |
53+
| `-q, question` | Question title / url to fetch | [question_title] |
5454
| `-r, run` | Execute file with default testcases | [file_to_run] |
5555
| `-rt, run-custom` | Execute file with custom testcases | [testcase_file] [file_to_run] |
5656
| `-s, submit` | Submit solution to leetcode after passing testcases | [file_to_submit] |
5757
| `-fs, fast-submit` | Submit solution to leetcode | [file_to_submit] |
5858
5959
### File changes
6060
61+
If you fetch the question from the CLI (using `-d` or `-q`), then tool will automatically add the required changes in the boiler plate code.
62+
63+
But if you are using your own code, then you need to make the following changes :
64+
6165
The file you submit to leetcode shouldn't have driver code like main function or struct definition. But no need to manually remove it. The tool will automatically remove the driver code and submit the solution to leetcode. All you need to do is put the delimiters `#LCSTART` and `#LCEND` in your solution file in comments, and *place leetcode problem link anywhere* in the file.
6266

6367
For example :
6468

6569
```rust
6670
struct Solution;
6771
68-
// https://leetcode.com/problems/two-sum/ #LCSTART
72+
// #LCSTART
6973
7074
impl Solution {
7175
pub fn two_sum(nums: Vec<i32>, target: i32) -> Vec<i32> {
7276
// real magic here
7377
}
74-
} // #LCEND
78+
} // #LCEND https://leetcode.com/problems/two-sum/
7579
7680
fn main() {
7781
// can have anything which may assist you
@@ -91,6 +95,12 @@ fn main() {
9195
leetcode-runner-cli -q koko-eating-bananas
9296
```
9397

98+
*OR*
99+
100+
```bash
101+
leetcode-runner-cli -q https://leetcode.com/problems/koko-eating-bananas/
102+
```
103+
94104
- Run src/main.rs with default testcases for question [koko-eating-bananas](https://leetcode.com/problems/koko-eating-bananas/)
95105

96106
```bash

0 commit comments

Comments
 (0)