mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-22 00:18:09 -05:00
Thanks Clippy :)
This commit is contained in:
parent
4ae3fcc3ca
commit
e80e91faf2
2 changed files with 5 additions and 5 deletions
|
@ -96,8 +96,8 @@ impl EmbeddedFiles {
|
|||
}
|
||||
|
||||
pub fn write_exercise_to_disk(&self, exercise_ind: usize, path: &str) -> Result<()> {
|
||||
let exercise_files = &EMBEDDED_FILES.exercise_files[exercise_ind];
|
||||
let dir = &EMBEDDED_FILES.exercise_dirs[exercise_files.dir_ind];
|
||||
let exercise_files = &self.exercise_files[exercise_ind];
|
||||
let dir = &self.exercise_dirs[exercise_files.dir_ind];
|
||||
|
||||
dir.init_on_disk()?;
|
||||
WriteStrategy::Overwrite.write(path, exercise_files.exercise)
|
||||
|
@ -109,8 +109,8 @@ impl EmbeddedFiles {
|
|||
exercise_ind: usize,
|
||||
exercise_name: &str,
|
||||
) -> Result<String> {
|
||||
let exercise_files = &EMBEDDED_FILES.exercise_files[exercise_ind];
|
||||
let dir = &EMBEDDED_FILES.exercise_dirs[exercise_files.dir_ind];
|
||||
let exercise_files = &self.exercise_files[exercise_ind];
|
||||
let dir = &self.exercise_dirs[exercise_files.dir_ind];
|
||||
|
||||
// 14 = 10 + 1 + 3
|
||||
// solutions/ + / + .rs
|
||||
|
|
|
@ -142,7 +142,7 @@ impl From<ExerciseInfo> for Exercise {
|
|||
|
||||
let hint = exercise_info.hint.trim().to_owned();
|
||||
|
||||
Exercise {
|
||||
Self {
|
||||
dir,
|
||||
name,
|
||||
path,
|
||||
|
|
Loading…
Reference in a new issue