Skip to content

Commit

Permalink
code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
wznmickey committed Jan 15, 2025
1 parent 056c2e7 commit 9ba744a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/course.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl GetFromJson<CourseFile, Rc<RefCell<Folder>>, PathBuf> for CourseFile {
Some(CourseFile {
id: x["id"].as_i64()?,
my_parent_path: {
path.join(f.borrow().course.borrow().name.to_string())
path.join(&f.borrow().course.borrow().name)
.join(&f.borrow().fullname)
},
display_name: temp,
Expand Down Expand Up @@ -168,7 +168,7 @@ impl GetFromJson<CourseFile, Rc<RefCell<Assignment>>, PathBuf> for CourseFile {
Some(CourseFile {
id: x["id"].as_i64()?,
my_parent_path: {
path.join(f.borrow().course.borrow().name.to_string())
path.join(&f.borrow().course.borrow().name)
.join(&f.borrow().name)
},
display_name: temp,
Expand Down
3 changes: 2 additions & 1 deletion src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ impl RemoteData {
path: PathBuf,
) -> Vec<Rc<RefCell<CourseFile>>> {
let mut ans = Vec::new();
for i in assignment.borrow().filelink.clone() {
let filelinks = assignment.borrow().filelink.clone();
for i in filelinks {
let url = i + "?"; // It is necessary to add a ?. Not sure why.
let mut tempans = self
.get_remote_json_list::<Rc<RefCell<Assignment>>, PathBuf, CourseFile>(
Expand Down

0 comments on commit 9ba744a

Please sign in to comment.