Invert &Options to Option<&T> (#10315)

Elide the reference for `Copy` type (`usize`)
Use the canonical deref where possible.
* `&Box` -> `&`
* `&String` -> `&str`
* `&PathBuf` -> `&Path`

Skips the ctrl-C handler for now.
This commit is contained in:
Stefan Holderbach
2023-09-13 01:00:58 +02:00
committed by GitHub
parent 3e14dc3eb8
commit a14e9e0a2e
24 changed files with 87 additions and 83 deletions

View File

@ -210,7 +210,7 @@ pub(crate) fn set_config_path(
cwd: &Path,
default_config_name: &str,
key: &str,
config_file: &Option<Spanned<String>>,
config_file: Option<&Spanned<String>>,
) {
let config_path = match config_file {
Some(s) => canonicalize_with(&s.item, cwd).ok(),