Skip to content

Commit 24ad751

Browse files
committed
Minor fixes
1 parent 5ff0a06 commit 24ad751

7 files changed

Lines changed: 15 additions & 20 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@ license = "Apache-2.0"
1212

1313
[dependencies]
1414
anyhow = "1.0.56"
15-
assert_cmd = "2.0.4"
1615
clap = "3.1.6"
1716
clap_complete = "3.1.1"
1817
crossterm = "0.23.0"
19-
dirs = "4.0.0"
2018
indicatif = "0.16.2"
21-
isolang = "2.1.0"
22-
log = "0.4.14"
23-
predicates = "2.1.1"
2419
reqwest = { version = "0.11.9", default-features = false, features = ["blocking", "json", "rustls-tls", "multipart"] }
2520
rpassword = "6.0.0"
2621
serde = "1.0.136"
@@ -32,6 +27,10 @@ toml = "0.5.8"
3227
tui = { version = "0.17.0", default-features = false, features = ['crossterm'] }
3328
url = "2.2.2"
3429

30+
[dev-dependencies]
31+
assert_cmd = "2.0.4"
32+
predicates = "2.1.1"
33+
3534
[build-dependencies]
3635
clap = "3.1.6"
3736
clap_complete = "3.1.1"

src/cli.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,26 @@ pub fn build_cli() -> Command<'static> {
9292
.required(false),
9393
),
9494
)
95-
.subcommand(Command::new("update").about("Update exercises"))
95+
.subcommand(Command::new("update-exercises").about("Update exercises"))
9696
.arg(
9797
Arg::new("no-update")
9898
.short('d')
9999
.long("no-update")
100-
.help("Disable auto update temporarily"),
100+
.help("Disable auto update temporarily")
101+
.hide(!cfg!(windows)), // hide on non-windows platforms
101102
)
102103
.arg(
103104
Arg::new("force-update")
104105
.short('u')
105106
.long("force-update")
106-
.help("Force auto update to run"),
107+
.help("Force auto update to run")
108+
.hide(!cfg!(windows)), // hide on non-windows platforms
107109
)
108110
.arg(
109111
Arg::new("testmode")
110112
.long("testmode")
111-
.help("Only for internal testing, disables server connection"),
113+
.help("Only for internal testing, disables server connection")
114+
.hide(true),
112115
)
113116
.subcommand(
114117
Command::new("generate-completions")

src/commands/courses.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ fn print_courses(io: &mut dyn Io, course_list: &[Course]) -> anyhow::Result<()>
2121
#[cfg(test)]
2222
mod tests {
2323
use super::*;
24-
use isolang::Language;
2524
use reqwest::Url;
2625
use std::{path::Path, slice::Iter};
2726
use tmc_langs::{
2827
ClientError, CourseDetails, CourseExercise, DownloadOrUpdateCourseExercisesResult,
29-
DownloadResult, ExercisesDetails, LangsError, NewSubmission, Organization,
28+
DownloadResult, ExercisesDetails, LangsError, Language, NewSubmission, Organization,
3029
SubmissionFinished, SubmissionStatus,
3130
};
3231
pub struct IoTest<'a> {

src/commands/exercises.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ fn print_exercises(
8989
#[cfg(test)]
9090
mod tests {
9191
use super::*;
92-
use isolang::Language;
9392
use reqwest::Url;
9493
use std::{path::Path, slice::Iter};
9594
use tmc_langs::{
96-
ClientError, Course, CourseDetails, CourseExercise, DownloadOrUpdateCourseExercisesResult,
95+
ClientError, Language, Course, CourseDetails, CourseExercise, DownloadOrUpdateCourseExercisesResult,
9796
DownloadResult, ExercisesDetails, LangsError, NewSubmission, Organization,
9897
SubmissionFinished, SubmissionStatus,
9998
};

src/commands/paste.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use crate::{
55
progress_reporting::ProgressBarManager,
66
};
77
use anyhow::Context;
8-
use isolang::Language;
9-
use tmc_langs::ClientUpdateData;
8+
use tmc_langs::{ClientUpdateData, Language};
109

1110
/// Sends the course exercise submission with paste message to the server.
1211
/// Path to the exercise can be given as a parameter or

src/commands/util.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
use crate::interactive::interactive_list;
22
use anyhow::Context;
3-
use isolang::Language;
43
use reqwest::Url;
54
use std::{
65
env,
76
path::{Path, PathBuf},
87
};
98
use tmc_langs::{
109
ClientError, ConfigValue, Course, CourseDetails, CourseExercise, Credentials,
11-
DownloadOrUpdateCourseExercisesResult, DownloadResult, ExercisesDetails, LangsError,
10+
DownloadOrUpdateCourseExercisesResult, DownloadResult, ExercisesDetails, LangsError, Language,
1211
NewSubmission, Organization, ProjectsConfig, SubmissionFinished, TmcClient, TmcConfig, Token,
1312
};
1413

0 commit comments

Comments
 (0)