Rust 1.78 (#11314)
Notable things I've had to fix due to 1.78: - Better detection of unused items - New clippy lint (`assigning_clones`) that points out places where assignment operations with clone rhs could be replaced with more performant `clone_into` Release Notes: - N/A
This commit is contained in:
parent
9ec0927701
commit
1a9b0536a2
41 changed files with 49 additions and 433 deletions
|
@ -1,6 +1,5 @@
|
|||
mod assets;
|
||||
mod color;
|
||||
mod util;
|
||||
mod vscode;
|
||||
|
||||
use std::fs::File;
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
use anyhow::Result;
|
||||
|
||||
pub trait Traverse<T, U> {
|
||||
fn traverse(self, f: impl FnOnce(T) -> Result<U>) -> Result<Option<U>>;
|
||||
}
|
||||
|
||||
impl<T, U> Traverse<T, U> for Option<T> {
|
||||
fn traverse(self, f: impl FnOnce(T) -> Result<U>) -> Result<Option<U>> {
|
||||
self.map_or(Ok(None), |value| f(value).map(Some))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue