From ddc46c90b0f4ac29ae40dc71abf543875baa3c12 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Tue, 17 Nov 2020 21:34:36 -0500 Subject: [PATCH] Rename the `try` variable to `r#try` This was changed automatically with `cargo fix --edition`. I could also see this being renamed to something else. --- src/tmp.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tmp.rs b/src/tmp.rs index 443eeb4..54d4b97 100644 --- a/src/tmp.rs +++ b/src/tmp.rs @@ -17,7 +17,7 @@ impl TmpDir { } pub fn create(&mut self) -> io::Result<(PathBuf, BufWriter)> { - let mut try = 1; + let mut r#try = 1; loop { let filename = self.dir.join(PathBuf::from(format!("tmp{:08x}.dat", self.n))); self.n += 1; @@ -29,13 +29,13 @@ impl TmpDir { Ok(f) => return Ok((filename, BufWriter::new(f))), Err(exc) => - if try < 999 && exc.kind() == io::ErrorKind::AlreadyExists { + if r#try < 999 && exc.kind() == io::ErrorKind::AlreadyExists { // keep going } else { return Err(exc); } } - try += 1; + r#try += 1; } } }