Skip to content
This repository was archived by the owner on Jul 16, 2022. It is now read-only.

Commit 081d95d

Browse files
committed
🌟
1 parent 5470dbe commit 081d95d

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/api.rs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ struct GistRequest {
3434

3535
#[derive(Debug, PartialEq, Serialize, Deserialize)]
3636
struct FileMetadata {
37-
// TODO: support binary file
3837
content: String,
3938
}
4039

src/app.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub fn upload(
88
login: &config::Login,
99
secret: bool,
1010
description: Option<&str>,
11-
files: &Vec<PathBuf>,
11+
files: &[PathBuf],
1212
) -> Result<()> {
1313
let client = api::Client::build()?;
1414
let res = client.upload(&login, !secret, description, files)?;

src/bin/gist.rs

+8
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ struct Account {
3131

3232
#[derive(Debug, StructOpt)]
3333
enum Subcommand {
34+
/// Login to GitHub with OAuth2 device flow
3435
Login(Login),
36+
/// Upload the files to GitHub Gist
3537
Upload(Upload),
38+
/// Browse the gists
3639
List(List),
3740
}
3841

@@ -45,10 +48,15 @@ struct Login {
4548

4649
#[derive(Debug, StructOpt)]
4750
struct Upload {
51+
/// Upload the files as secret gist
4852
#[structopt(short)]
4953
secret: bool,
54+
55+
/// Add a description to gist
5056
#[structopt(short)]
5157
description: Option<String>,
58+
59+
/// Specify the files to upload
5260
#[structopt(name = "FILES", parse(from_os_str), required = true)]
5361
files: Vec<PathBuf>,
5462
}

0 commit comments

Comments
 (0)