Skip to content

Commit

Permalink
comment uncompiled code
Browse files Browse the repository at this point in the history
  • Loading branch information
wznmickey committed Mar 30, 2024
1 parent 968394b commit 159bd36
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
74 changes: 37 additions & 37 deletions src/course.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,42 @@ pub fn get_course_from_json(x: &Value) -> Option<Course> {
term_name: x["term"]["name"].as_str()?.to_string(),
})
}
impl Course {
pub fn download_files(&self) -> DownloadFolder {
DownloadFolder {}
}
}
// impl Course {
// pub fn download_files(&self) -> DownloadFolder {
// DownloadFolder {}
// }
// }

pub struct DownloadFile {
size: i64,
remote_url: String,
local_path: String,
need_update: bool,
local_temp_path: String,
}
// pub struct DownloadFile {
// size: i64,
// remote_url: String,
// local_path: String,
// need_update: bool,
// local_temp_path: String,
// }

impl DownloadFile {
pub fn new(
size: i64,
remote_url: String,
local_path: String,
need_update: bool,
local_temp_path: String,
) -> Self {
Self {
size,
remote_url,
local_path,
need_update,
local_temp_path,
}
}
}
pub struct DownloadFolder {
files: Vec<DownloadFile>,
name: String,
local_path: String,
}
impl DownloadFolder {
pub fn new(id: i64) -> Self {}
}
// impl DownloadFile {
// pub fn new(
// size: i64,
// remote_url: String,
// local_path: String,
// need_update: bool,
// local_temp_path: String,
// ) -> Self {
// Self {
// size,
// remote_url,
// local_path,
// need_update,
// local_temp_path,
// }
// }
// }
// pub struct DownloadFolder {
// files: Vec<DownloadFile>,
// name: String,
// local_path: String,
// }
// impl DownloadFolder {
// pub fn new(id: i64) -> Self {}
// }
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
// println!("Hello, world!");
let x = RemoteData::new();
let mycourses=x.get_course_list();
for course in mycourses{
course.download_files();
}
// for course in mycourses{
// course.download_files();
// }
}

0 comments on commit 159bd36

Please sign in to comment.