Skip to content

Commit 73e459f

Browse files
committed
fix clippy lints
1 parent 36f7fc8 commit 73e459f

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

tmc-langs-cli/tests/core_mock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn get_organizations() {
7676
}
7777

7878
//#[test]
79-
fn download_or_update_exercises() {
79+
fn _download_or_update_exercises() {
8080
let _m = init();
8181
let out = run_cmd(&[
8282
"core",
@@ -91,5 +91,5 @@ fn download_or_update_exercises() {
9191
"path2",
9292
]);
9393
assert!(out.status.success());
94-
let out = String::from_utf8(out.stdout).unwrap();
94+
let _out = String::from_utf8(out.stdout).unwrap();
9595
}

tmc-langs-core/src/tmc_core.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ mod test {
490490

491491
#[test]
492492
fn get_organizations() {
493-
let (core, addr) = init();
493+
let (core, _addr) = init();
494494
let _m = mock("GET", "/api/v8/org.json")
495495
.with_body(
496496
serde_json::json!([
@@ -511,7 +511,7 @@ mod test {
511511

512512
#[test]
513513
fn download_or_update_exercises() {
514-
let (core, addr) = init();
514+
let (core, _addr) = init();
515515
let _m = mock("GET", "/api/v8/core/exercises/1234/download")
516516
.with_body_from_file(Path::new("tests/data/81842.zip"))
517517
.create();
@@ -526,7 +526,7 @@ mod test {
526526

527527
#[test]
528528
fn get_course_details() {
529-
let (core, addr) = init();
529+
let (core, _addr) = init();
530530
let _m = mock("GET", "/api/v8/core/courses/1234")
531531
.with_body(serde_json::json!({
532532
"course": {
@@ -576,7 +576,7 @@ mod test {
576576

577577
#[test]
578578
fn list_courses() {
579-
let (core, addr) = init();
579+
let (core, _addr) = init();
580580
let _m = mock("GET", "/api/v8/core/org/slug/courses")
581581
.with_body(serde_json::json!([
582582
{
@@ -715,7 +715,7 @@ mod test {
715715

716716
#[test]
717717
fn get_exercise_updates() {
718-
let (core, addr) = init();
718+
let (core, _addr) = init();
719719
let _m = mock("GET", "/api/v8/core/courses/1234")
720720
.with_body(serde_json::json!({
721721
"course": {
@@ -818,7 +818,7 @@ mod test {
818818
}
819819

820820
//#[test]
821-
fn mark_review_as_read() {
821+
fn _mark_review_as_read() {
822822
// todo
823823
let (core, addr) = init();
824824
let update_url = Url::parse(&addr).unwrap().join("update-url").unwrap();

tmc-langs-core/tests/integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ fn get_organizations() {
1111

1212
let mut core = TmcCore::new_in_config("https://tmc.mooc.fi".to_string()).unwrap();
1313
core.authenticate("vscode_plugin", email, password).unwrap();
14-
let cd = core.get_course_details(600).unwrap();
14+
let _cd = core.get_course_details(600).unwrap();
1515
}

tmc-langs-framework/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ mod test {
208208
const PLUGIN_NAME: &'static str = "mock_plugin";
209209
type StudentFilePolicy = MockPolicy;
210210

211-
fn get_student_file_policy(project_path: &Path) -> Self::StudentFilePolicy {
211+
fn get_student_file_policy(_project_path: &Path) -> Self::StudentFilePolicy {
212212
unimplemented!()
213213
}
214214

tmc-langs-java/src/maven.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ mod test {
384384

385385
// TODO: currently will extract maven to your cache directory
386386
// #[test] TODO: changing PATH breaks other tests
387-
fn unpack_bundled_mvn() {
387+
fn _unpack_bundled_mvn() {
388388
let plugin = MavenPlugin::new().unwrap();
389389
std::env::set_var("PATH", "");
390390
let cmd = plugin.get_mvn_command().unwrap();

tmc-langs-notests/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use std::collections::HashMap;
1010
use std::path::Path;
1111
use std::time::Duration;
1212

13+
#[derive(Default)]
1314
pub struct NoTestsPlugin {}
1415

1516
impl NoTestsPlugin {

tmc-langs-python3/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ mod test {
288288
#[test]
289289
fn exercise_type_is_correct() {
290290
init();
291-
let plugin = Python3Plugin::new();
291+
let _plugin = Python3Plugin::new();
292292

293293
let correct = Python3Plugin::is_exercise_type_correct(Path::new("tests/data"));
294294
assert!(correct);

tmc-langs-r/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl LanguagePlugin for RPlugin {
116116
}
117117

118118
#[cfg(test)]
119-
#[cfg(linux)]
119+
#[cfg(unix)]
120120
mod test {
121121
use super::*;
122122
use std::path::PathBuf;

0 commit comments

Comments
 (0)