From 7b4d81efd4f588bac5742d682d5bae7637cfc089 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 10 Oct 2020 13:29:37 -0500 Subject: [PATCH] refactor/polish ~ fix `cargo clippy` complaint (needless_collect) --- src/uu/expand/src/expand.rs | 2 +- src/uu/unexpand/src/unexpand.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uu/expand/src/expand.rs b/src/uu/expand/src/expand.rs index 560ffc840..d478c3c73 100644 --- a/src/uu/expand/src/expand.rs +++ b/src/uu/expand/src/expand.rs @@ -29,7 +29,7 @@ static LONG_HELP: &str = ""; static DEFAULT_TABSTOP: usize = 8; fn tabstops_parse(s: String) -> Vec { - let words = s.split(',').collect::>(); + let words = s.split(','); let nums = words .into_iter() diff --git a/src/uu/unexpand/src/unexpand.rs b/src/uu/unexpand/src/unexpand.rs index 1ca12ba87..d15e3f73c 100644 --- a/src/uu/unexpand/src/unexpand.rs +++ b/src/uu/unexpand/src/unexpand.rs @@ -26,7 +26,7 @@ static VERSION: &str = env!("CARGO_PKG_VERSION"); const DEFAULT_TABSTOP: usize = 8; fn tabstops_parse(s: String) -> Vec { - let words = s.split(',').collect::>(); + let words = s.split(','); let nums = words .into_iter()