Mercurial > hg-stable
comparison rust/rhg/src/ui.rs @ 51118:532e74ad3ff6
rust: run a clippy pass with the latest stable version
Our current version of clippy is older than the latest stable.
The newest version has new lints that are moslty good advice, so let's apply
them ahead of time. This has the added benefit of reducing the noise for
developpers like myself that use clippy as an IDE helper, as well as being
more prepared for a future clippy upgrade.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 06 Nov 2023 11:06:08 +0100 |
parents | 74e4dbb0fcd5 |
children |
comparison
equal
deleted
inserted
replaced
51117:d58e754f2db0 | 51118:532e74ad3ff6 |
---|---|
249 ) -> Vec<u8> { | 249 ) -> Vec<u8> { |
250 match warning { | 250 match warning { |
251 PatternFileWarning::InvalidSyntax(path, syntax) => format_bytes!( | 251 PatternFileWarning::InvalidSyntax(path, syntax) => format_bytes!( |
252 b"{}: ignoring invalid syntax '{}'\n", | 252 b"{}: ignoring invalid syntax '{}'\n", |
253 get_bytes_from_path(path), | 253 get_bytes_from_path(path), |
254 &*syntax | 254 syntax |
255 ), | 255 ), |
256 PatternFileWarning::NoSuchFile(path) => { | 256 PatternFileWarning::NoSuchFile(path) => { |
257 let path = if let Ok(relative) = | 257 let path = if let Ok(relative) = |
258 path.strip_prefix(repo.working_directory_path()) | 258 path.strip_prefix(repo.working_directory_path()) |
259 { | 259 { |
260 relative | 260 relative |
261 } else { | 261 } else { |
262 &*path | 262 path |
263 }; | 263 }; |
264 format_bytes!( | 264 format_bytes!( |
265 b"skipping unreadable pattern file '{}': \ | 265 b"skipping unreadable pattern file '{}': \ |
266 No such file or directory\n", | 266 No such file or directory\n", |
267 get_bytes_from_path(path), | 267 get_bytes_from_path(path), |