Skip to content

Commit 39244aa

Browse files
committed
allow dead code in API impl
1 parent a170e88 commit 39244aa

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

tmc-langs-core/src/tmc_core.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub type Token =
2626
/// A struct for interacting with the TestMyCode service, including authentication
2727
pub struct TmcCore {
2828
client: Client,
29+
#[allow(dead_code)]
2930
config_dir: PathBuf, // not used yet
3031
api_url: Url,
3132
auth_url: Url,

tmc-langs-core/src/tmc_core/api.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ impl GetExt for RequestBuilder {
7070
}
7171
}
7272

73+
#[allow(dead_code)]
7374
impl TmcCore {
7475
// convenience function
7576
fn get_json<T: DeserializeOwned>(&self, url_tail: &str) -> Result<T> {
@@ -154,7 +155,7 @@ impl TmcCore {
154155
}
155156

156157
pub(super) fn course_points(&self, course_id: usize) -> Result<()> {
157-
let url_tail = format!("courses/{}/points", course_id);
158+
let _url_tail = format!("courses/{}/points", course_id);
158159
todo!("times out")
159160
}
160161

@@ -234,13 +235,12 @@ impl TmcCore {
234235
organization_slug: &str,
235236
course_name: &str,
236237
) -> Result<()> {
237-
todo!("This feature is only for MOOC-organization's 2019 programming MOOC");
238-
let url_tail = format!(
238+
let _url_tail = format!(
239239
"org/{}/courses/{}/eligible_students",
240240
percent_encode(organization_slug),
241241
percent_encode(course_name)
242242
);
243-
self.get_json(&url_tail)
243+
todo!("This feature is only for MOOC-organization's 2019 programming MOOC");
244244
}
245245

246246
pub(super) fn exercise_points_by_name(
@@ -466,8 +466,8 @@ impl TmcCore {
466466
}
467467

468468
pub(super) fn unlock(&self, course_id: usize) -> Result<()> {
469+
let _url_tail = format!("core/courses/{}", course_id);
469470
todo!("needs admin?");
470-
let url_tail = format!("core/courses/{}", course_id);
471471
}
472472

473473
pub(super) fn download_exercise(&self, exercise_id: usize, target: &Path) -> Result<()> {

tmc-langs-notests/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Language plugin for no_tests exercises
22
33
use tmc_langs_framework::{
4-
domain::{ExerciseDesc, NoTests, NoTestsPoints, RunResult, RunStatus, TestDesc, TestResult},
4+
domain::{ExerciseDesc, RunResult, RunStatus, TestDesc, TestResult},
55
policy::EverythingIsStudentFilePolicy,
66
Error, LanguagePlugin, StudentFilePolicy,
77
};

0 commit comments

Comments
 (0)