Skip to content

Commit

Permalink
Merge branch 'master' into fix-alert-17
Browse files Browse the repository at this point in the history
  • Loading branch information
mautamu committed Feb 17, 2024
2 parents 6407e24 + f168eb4 commit 5c0d970
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 158 deletions.
312 changes: 164 additions & 148 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ resolver="1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "3.0.0-beta.4", features=["derive"] }
clap = { version = "4.4", features=["derive"] }
colored = "2.0.0"
dirs-next = "2.0.0"
edit-distance = "2.1.0"
fuzzy-matcher = "0.3.7"
git2 = {version = "0.18"}
leftwm-core = "0.4.0"
git2 = {version = "0.18", features=["vendored-libgit2"]}
leftwm-core = "0.5"
log = "0.4"
pretty_env_logger = "0.5.0"
regex = "1.5.4"
Expand All @@ -30,7 +30,7 @@ serde = "1.0.104"
serde_derive = "1.0.104"
serde_json = "1.0.44"
tempfile = "3.2.0"
toml = "0.5.5"
toml = "0.8"
xdg = "2.2.0"
url = "2.2.2"

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use std::env;
#[clap(author, about, version)]
pub struct Opt {
/// Verbose mode (-v, -vv, -vvv, etc.)
#[clap(short, long, parse(from_occurrences))]
#[clap(short, long, action = clap::ArgAction::Count)]
pub verbose: u8,
/// Operation to be performed by the theme manager
#[clap(subcommand)]
Expand Down
2 changes: 1 addition & 1 deletion src/operations/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Apply {
}
trace!("{:?}", &path);
match fs::remove_dir_all(&dir) {
Ok(_) => {
Ok(()) => {
warn!("Removed old current directory");
}
Err(_) => {
Expand Down
4 changes: 2 additions & 2 deletions src/operations/migrate_toml_to_ron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ impl Migrate {

fn migrate(path: &PathBuf) -> Result<(), LeftError> {
let Ok(theme) = load_theme_file(path) else {
return Err(LeftError::from("Theme not found"));
};
return Err(LeftError::from("Theme not found"));
};
let mut ron_path = path.clone();
ron_path.set_extension("ron");
match write_to_file(&ron_path, &theme) {
Expand Down
3 changes: 3 additions & 0 deletions src/operations/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ impl Support {
/// # Errors
///
/// Should not error.
///
/// # Panics
/// May panic if xdg-open not found, or handler not set
pub fn exec(&self, config: &mut Config) -> Result<(), errors::LeftError> {
'outer: for repo in &config.repos {
trace!("Searching themes from {}", &repo.name);
Expand Down
4 changes: 3 additions & 1 deletion src/operations/uninstall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ impl Uninstall {
"{}",
"Looking for theme to uninstall . . . ".bright_blue().bold()
);
let Some(theme) = Theme::find_installed(config, &self.name) else { return Err(LeftError::from("Theme not found")) };
let Some(theme) = Theme::find_installed(config, &self.name) else {
return Err(LeftError::from("Theme not found"));
};
if let Some(directory) = theme.directory {
let path = Path::new(&directory);
if self.noconfirm
Expand Down
2 changes: 1 addition & 1 deletion src/operations/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Upgrade {
);
let git_repo = Repository::open(theme_directory)?;
match fetch_origin_main(&git_repo) {
Ok(_) => {
Ok(()) => {
//if defined, attempt to checkout the specific index
if theme.commit.is_some()
&& theme.commit.clone().unwrap_or_default() != *"*"
Expand Down

0 comments on commit 5c0d970

Please sign in to comment.