Skip to content

Commit f8e12f3

Browse files
committed
make clippy happy
1 parent 481168f commit f8e12f3

3 files changed

Lines changed: 17 additions & 15 deletions

File tree

src/simpleaf_commands/quant.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::utils::af_utils::*;
22

3+
use crate::utils::prog_parsing_utils;
34
use crate::utils::prog_utils;
45
use crate::utils::prog_utils::{CommandVerbosityLevel, ReqProgs};
5-
use crate::utils::prog_parsing_utils;
66

77
use anyhow::{bail, Context};
88
use serde_json::json;
@@ -626,7 +626,6 @@ being used by simpleaf"#,
626626
if !cres.status.success() {
627627
bail!("piscem mapping failed with exit status {:?}", cres.status);
628628
}
629-
630629
}
631630
IndexType::Salmon(ref index_base) => {
632631
// using a salmon index
@@ -737,33 +736,36 @@ being used by simpleaf"#,
737736
// make the quant directory
738737
let gpl_output = opts.output.join("af_quant");
739738

740-
let _r = std::fs::create_dir_all(&gpl_output).with_context(
741-
|| format!("Failed to create quantification output directory {}", gpl_output.display())
742-
)?;
743-
744-
// attempt to get the relevant information from map_info to propagate forward to the
739+
std::fs::create_dir_all(&gpl_output).with_context(|| {
740+
format!(
741+
"Failed to create quantification output directory {}",
742+
gpl_output.display()
743+
)
744+
})?;
745+
746+
// attempt to get the relevant information from map_info to propagate forward to the
745747
// quantification directory
746748
//get_mapping_info
747749
let mapping_log = match index_type {
748750
IndexType::Piscem(_) => {
749751
let piscem_map_log_path = map_output.join("map_info.json");
750752
prog_parsing_utils::construct_json_from_piscem_log(piscem_map_log_path)?
751-
},
753+
}
752754
IndexType::Salmon(_) => {
753755
let salmon_log_path = map_output.join("logs").join("salmon_quant.log");
754756
prog_parsing_utils::construct_json_from_salmon_log(salmon_log_path)?
755-
},
757+
}
756758
IndexType::NoIndex => {
757759
serde_json::json!({
758760
"mapper" : "pre_mapped",
759761
"num_mapped": 0,
760762
"num_poisoned": 0,
761763
"num_reads": 0,
762-
"percent_mapped": 0.
764+
"percent_mapped": 0.
763765
})
764766
}
765767
};
766-
768+
767769
let map_info_path = gpl_output.join("simpleaf_map_info.json");
768770
let map_info_file = std::fs::File::create(map_info_path)?;
769771
serde_json::to_writer(map_info_file, &mapping_log)?;

src/simpleaf_commands/workflow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ pub fn get_workflow<T: AsRef<Path>>(
361361
/// Simpleaf Workflow JSON format required fields:
362362
/// 1. json_type: This field has to exist and have the value "Simpleaf Workflow"
363363
/// 2. simpleaf_version: This field has to exist and contains the version of simpleaf
364-
/// used for making the file. If the files are made manually, this value has to be
365-
/// higher than 0.11.0
364+
/// used for making the file. If the files are made manually, this value has to be
365+
/// higher than 0.11.0
366366
/// 3. index: (Optional): this field records all simpleaf index commands that need to be run.
367367
/// 4. quant: (Optional): this field records all simpleaf quant commands that need to be run.
368368
// TODO: add a `skip` argument for skipping steps

src/utils/workflow_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,9 @@ impl WorkflowLog {
819819
/// Write log to the output path.
820820
/// 1. an execution log file includes the whole workflow,
821821
/// in which succeffully invoked commands have
822-
/// a negative `step`
822+
/// a negative `step`
823823
/// 2. an info log file records runtime, workflow name,
824-
/// output path etc.
824+
/// output path etc.
825825
pub fn write(&self, succeed: bool) -> anyhow::Result<()> {
826826
// initiate meta_info
827827
let workflow_meta_info = if let Some(workflow_meta_info) = &self.workflow_meta_info {

0 commit comments

Comments
 (0)