Skip to content

Commit

Permalink
cli: clippy: use write instead of format
Browse files Browse the repository at this point in the history
  • Loading branch information
kartva committed Aug 15, 2022
1 parent ae46ead commit 83c3b3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{
fs::{read_dir, File},
io::{Read, Write},
process::{Command, Stdio},
fmt::Write as _,
};
use thiserror::Error;

Expand Down Expand Up @@ -41,7 +42,7 @@ pub fn plot_comp(comp: Vec<BaseComp>) -> Result<Vec<Plot>, PlotError> {
let mut input = String::new();

for (i, c) in comp.into_iter().enumerate() {
input += &format!("sample_{:02}\t", i + 1);
write!(&mut input, "sample_{:02}\t", i + 1).unwrap(); // this unwrap never fails
c.lib
.into_iter()
.flat_map(|b| b.bases.iter())
Expand Down

0 comments on commit 83c3b3f

Please sign in to comment.