diff rust/hg-core/src/revset.rs @ 50003:e98fd81bb151

rust-clippy: fix most warnings in `hg-core` All of these are simple changes that for the most part are clear improvements and the rest are at most equivalent. The remaining warnings have to be fixed either with a bigger refactor like for the nested "revlog" module, or in the dependency `bytes-cast`, which we own. This will be done sometime in the future.
author Rapha?l Gom?s <rgomes@octobus.net>
date Mon, 09 Jan 2023 19:18:43 +0100
parents 3da7bf75fdb2
children 750409505286
line wrap: on
line diff
--- a/rust/hg-core/src/revset.rs	Mon Jan 09 19:14:14 2023 +0100
+++ b/rust/hg-core/src/revset.rs	Mon Jan 09 19:18:43 2023 +0100
@@ -21,7 +21,7 @@
     match input {
         "." => {
             let p1 = repo.dirstate_parents()?.p1;
-            return Ok(changelog.revlog.rev_from_node(p1.into())?);
+            return changelog.revlog.rev_from_node(p1.into());
         }
         "null" => return Ok(NULL_REVISION),
         _ => {}
@@ -33,7 +33,7 @@
             let msg = format!("cannot parse revset '{}'", input);
             Err(HgError::unsupported(msg).into())
         }
-        result => return result,
+        result => result,
     }
 }