Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
edomora97 committed Mar 5, 2020
1 parent 98e0843 commit c8ef154
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions task-maker-format/src/ioi/format/italian_yaml/cases_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,12 @@ where
/// Write an auto-generated version of the gen/GEN file inside the task directory.
pub(crate) fn write_gen_gen(&self) -> Result<(), Error> {
let dest = self.task_dir.join("gen/GEN");
if dest.exists() {
if !is_gen_gen_deletable(&dest)? {
warn!(
"The gen/GEN file does not contain {}. Won't overwrite",
TM_ALLOW_DELETE_COOKIE
);
return Ok(());
}
if dest.exists() && !is_gen_gen_deletable(&dest)? {
warn!(
"The gen/GEN file does not contain {}. Won't overwrite",
TM_ALLOW_DELETE_COOKIE
);
return Ok(());
}
let mut gen = "# Generated by task-maker. Do not edit!\n".to_string();
gen += &format!("# {}\n", TM_ALLOW_DELETE_COOKIE);
Expand Down

0 comments on commit c8ef154

Please sign in to comment.