Mercurial > hg
comparison rust/hg-core/src/vfs.rs @ 49914:58074252db3c
rust: run `cargo clippy`
These automatic fixes are good to have because they make the code
more idiomatic and less surprising.
The transform from `sort` -> `sort_unstable` is questionable, but this is
only in a test, so it doesn't matter in our case.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 09 Jan 2023 17:40:03 +0100 |
parents | ffd4b1f1c9cb |
children | a6b8b1ab9116 |
comparison
equal
deleted
inserted
replaced
49913:c15b415d1bff | 49914:58074252db3c |
---|---|
46 relative_path: impl AsRef<Path>, | 46 relative_path: impl AsRef<Path>, |
47 ) -> Result<Option<Vec<u8>>, HgError> { | 47 ) -> Result<Option<Vec<u8>>, HgError> { |
48 match self.read(relative_path) { | 48 match self.read(relative_path) { |
49 Err(e) => match &e { | 49 Err(e) => match &e { |
50 HgError::IoError { error, .. } => match error.kind() { | 50 HgError::IoError { error, .. } => match error.kind() { |
51 ErrorKind::NotFound => return Ok(None), | 51 ErrorKind::NotFound => Ok(None), |
52 _ => Err(e), | 52 _ => Err(e), |
53 }, | 53 }, |
54 _ => Err(e), | 54 _ => Err(e), |
55 }, | 55 }, |
56 Ok(v) => Ok(Some(v)), | 56 Ok(v) => Ok(Some(v)), |