Skip to content

Commit 1292336

Browse files
committed
Clean up warnings from new clippy release
1 parent 4e9dc47 commit 1292336

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/test-support/src/matchers.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ impl Execs {
322322
Ok(actual) => actual,
323323
};
324324
// Let's not deal with \r\n vs \n on windows...
325-
let actual = actual.replace("\r", "");
326-
let actual = actual.replace("\t", "<tab>");
325+
let actual = actual.replace('\r', "");
326+
let actual = actual.replace('\t', "<tab>");
327327

328328
match kind {
329329
MatchKind::Exact => {
@@ -515,8 +515,8 @@ enum MatchKind {
515515
/// See `substitute_macros` for a complete list of macros.
516516
pub fn lines_match(expected: &str, actual: &str) -> bool {
517517
// Let's not deal with / vs \ (windows...)
518-
let expected = expected.replace("\\", "/");
519-
let mut actual: &str = &actual.replace("\\", "/");
518+
let expected = expected.replace('\\', "/");
519+
let mut actual: &str = &actual.replace('\\', "/");
520520
let expected = substitute_macros(&expected);
521521
for (i, part) in expected.split("[..]").enumerate() {
522522
match actual.find(part) {

src/command/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mod os {
6060
let profiles = determine_profiles()?;
6161

6262
let found_profile = profiles.into_iter().fold(false, |prev, profile| {
63-
let contents = read_profile_without_volta(&profile).unwrap_or_else(String::new);
63+
let contents = read_profile_without_volta(&profile).unwrap_or_default();
6464

6565
let write_profile = match profile.extension() {
6666
Some(ext) if ext == "fish" => write_profile_fish,

0 commit comments

Comments
 (0)