Clean up dependencies, lints
`lazy_static` and `smol_str` weren't used. COSMIC Player used `dirs` once to find the user's home directory. Rust fixed and undeprecated its `home_dir` function in 1.85, which released earlier this year and is the MSRV of libcosmic.
This commit is contained in:
parent
04c354584d
commit
27ea8d2770
4 changed files with 9 additions and 21 deletions
|
|
@ -10,12 +10,12 @@ use std::{collections::HashMap, path::PathBuf};
|
|||
use crate::{fl, Action, Config, ConfigState, Message};
|
||||
|
||||
pub fn menu_bar<'a>(
|
||||
config: &Config,
|
||||
_config: &Config,
|
||||
config_state: &ConfigState,
|
||||
key_binds: &HashMap<KeyBind, Action>,
|
||||
projects: &Vec<(String, PathBuf)>,
|
||||
projects: &[(String, PathBuf)],
|
||||
) -> Element<'a, Message> {
|
||||
let home_dir_opt = dirs::home_dir();
|
||||
let home_dir_opt = std::env::home_dir();
|
||||
let format_path = |path: &PathBuf| -> String {
|
||||
if let Some(home_dir) = &home_dir_opt {
|
||||
if let Ok(part) = path.strip_prefix(home_dir) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue