From 83c3b3fee8a24d35ec55c5f0a4043f2c8a32e2c1 Mon Sep 17 00:00:00 2001 From: Kartavya Vashishtha Date: Mon, 15 Aug 2022 19:33:00 +0530 Subject: [PATCH] cli: clippy: use write instead of format --- server/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/lib.rs b/server/src/lib.rs index 7e44574..9ad417a 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -4,6 +4,7 @@ use std::{ fs::{read_dir, File}, io::{Read, Write}, process::{Command, Stdio}, + fmt::Write as _, }; use thiserror::Error; @@ -41,7 +42,7 @@ pub fn plot_comp(comp: Vec) -> Result, 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())