mirror of
https://github.com/numtide/treefmt.git
synced 2024-09-11 17:07:44 +03:00
fix clippy warnings
This commit is contained in:
parent
63c58e4f55
commit
4edd9dc581
@ -380,7 +380,7 @@ pub fn run_treefmt_stdin(
|
||||
formatters
|
||||
.first()
|
||||
.unwrap()
|
||||
.fmt(&vec![tmpfile.path().to_path_buf()])?;
|
||||
.fmt(&[tmpfile.path().to_path_buf()])?;
|
||||
|
||||
// Seek back to start
|
||||
let mut tmpfile = tmpfile.reopen()?;
|
||||
|
@ -107,7 +107,7 @@ impl CacheManifest {
|
||||
/// Checks and inserts the formatter info into the cache.
|
||||
/// If the formatter info has changed, invalidate all the old paths.
|
||||
pub fn update_formatters(&mut self, formatters: BTreeMap<FormatterName, Formatter>) {
|
||||
let mut old_formatters = std::mem::replace(&mut self.formatters, BTreeMap::new());
|
||||
let mut old_formatters = std::mem::take(&mut self.formatters);
|
||||
for (name, fmt) in formatters {
|
||||
match load_formatter_info(fmt) {
|
||||
Ok(new_fmt_info) => {
|
||||
|
Loading…
Reference in New Issue
Block a user