Skip to content

Commit bfd09e5

Browse files
committed
unified imports
1 parent e8706f5 commit bfd09e5

File tree

16 files changed

+48
-39
lines changed

16 files changed

+48
-39
lines changed

plugins/csharp/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
mod error;
44
mod plugin;
55

6-
pub use error::CSharpError;
7-
pub use plugin::{CSharpPlugin, CSharpStudentFilePolicy};
6+
pub use self::error::CSharpError;
7+
pub use self::plugin::{CSharpPlugin, CSharpStudentFilePolicy};
8+
89
use serde::Deserialize;
910
use tmc_langs_framework::domain::TestResult;
1011

plugins/csharp/src/plugin.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
33
mod policy;
44

5+
pub use self::policy::CSharpStudentFilePolicy;
6+
57
use crate::{CSTestResult, CSharpError};
6-
pub use policy::CSharpStudentFilePolicy;
78
use std::collections::HashMap;
89
use std::env;
910
use std::ffi::{OsStr, OsString};

plugins/java/src/ant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
33
pub mod policy;
44

5+
use self::policy::AntStudentFilePolicy;
56
use crate::{error::JavaError, plugin::JavaPlugin, CompileResult, TestRun, SEPARATOR};
67
use j4rs::Jvm;
7-
use policy::AntStudentFilePolicy;
88
use std::env;
99
use std::ffi::OsStr;
1010
use std::path::{Path, PathBuf};

plugins/java/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ mod error;
55
mod maven;
66
mod plugin;
77

8-
pub use ant::{policy::AntStudentFilePolicy, AntPlugin};
9-
pub use error::JavaError;
10-
pub use maven::{policy::MavenStudentFilePolicy, MavenPlugin};
8+
pub use self::ant::{policy::AntStudentFilePolicy, AntPlugin};
9+
pub use self::error::JavaError;
10+
pub use self::maven::{policy::MavenStudentFilePolicy, MavenPlugin};
1111

1212
use j4rs::{ClasspathEntry, Jvm, JvmBuilder};
1313
use serde::Deserialize;

plugins/java/src/maven.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
33
pub mod policy;
44

5+
use self::policy::MavenStudentFilePolicy;
56
use crate::{error::JavaError, plugin::JavaPlugin, CompileResult, TestRun, SEPARATOR};
67
use flate2::read::GzDecoder;
78
use j4rs::Jvm;
8-
use policy::MavenStudentFilePolicy;
99
use std::ffi::OsString;
1010
use std::io::Cursor;
1111
use std::path::{Path, PathBuf};

plugins/notests/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//! Language plugin for no_tests exercises
22
3+
pub use tmc_langs_framework::policy::EverythingIsStudentFilePolicy as NoTestsStudentFilePolicy;
4+
35
use std::collections::HashMap;
46
use std::io::{Read, Seek};
57
use std::path::{Path, PathBuf};
68
use std::time::Duration;
7-
pub use tmc_langs_framework::policy::EverythingIsStudentFilePolicy as NoTestsStudentFilePolicy;
89
use tmc_langs_framework::{
910
anyhow,
1011
domain::{ExerciseDesc, RunResult, RunStatus, TestDesc, TestResult},

plugins/python3/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ mod error;
44
mod plugin;
55
mod policy;
66

7-
pub use error::PythonError;
7+
pub use self::error::PythonError;
8+
pub use self::plugin::Python3Plugin;
9+
pub use self::policy::Python3StudentFilePolicy;
10+
811
use lazy_static::lazy_static;
9-
pub use plugin::Python3Plugin;
10-
pub use policy::Python3StudentFilePolicy;
1112
use serde::{Deserialize, Serialize};
1213
use std::env;
1314
use std::path::PathBuf;

plugins/r/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ mod error;
44
mod plugin;
55
mod policy;
66

7-
pub use plugin::RPlugin;
8-
pub use policy::RStudentFilePolicy;
7+
pub use self::plugin::RPlugin;
8+
pub use self::policy::RStudentFilePolicy;
9+
910
use serde::{Deserialize, Serialize};
1011
use std::collections::HashMap;
1112
use tmc_langs_framework::domain::{RunResult, RunStatus, TestResult};

tmc-langs-cli/src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ mod credentials;
44
mod projects_config;
55
mod tmc_config;
66

7-
pub use credentials::Credentials;
8-
pub use projects_config::{CourseConfig, Exercise, ProjectsConfig};
9-
pub use tmc_config::{ConfigValue, TmcConfig};
7+
pub use self::credentials::Credentials;
8+
pub use self::projects_config::{CourseConfig, Exercise, ProjectsConfig};
9+
pub use self::tmc_config::{ConfigValue, TmcConfig};
1010

1111
use anyhow::{Context, Error};
1212
use std::env;

tmc-langs-cli/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ mod config;
55
mod error;
66
mod output;
77

8+
use self::config::ProjectsConfig;
9+
use self::config::{CourseConfig, Credentials, Exercise, TmcConfig};
10+
use self::error::{InvalidTokenError, SandboxTestError};
11+
use self::output::{
12+
CombinedCourseData, ErrorData, Kind, Output, OutputData, OutputResult, Status, Warnings,
13+
};
814
use anyhow::{Context, Result};
915
use clap::{ArgMatches, Error, ErrorKind};
10-
use config::ProjectsConfig;
11-
use config::{CourseConfig, Credentials, Exercise, TmcConfig};
12-
use error::{InvalidTokenError, SandboxTestError};
1316
use heim::disk;
14-
use output::{
15-
CombinedCourseData, ErrorData, Kind, Output, OutputData, OutputResult, Status, Warnings,
16-
};
1717
use serde::Serialize;
1818
use serde_json::Value as JsonValue;
1919
use std::collections::HashMap;

0 commit comments

Comments
 (0)