Skip to content

Commit

Permalink
fix(#64): vendor libgit2, update deps (#69)
Browse files Browse the repository at this point in the history
* fix(#64): vendor libgit2, update deps

* chore: clippy, fmt

* chore: update all deps to latest
  • Loading branch information
mautamu committed Dec 28, 2023
1 parent c3df754 commit f168eb4
Show file tree
Hide file tree
Showing 8 changed files with 502 additions and 402 deletions.
877 changes: 486 additions & 391 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ 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.17"}
leftwm-core = "0.4.0"
git2 = {version = "0.18", features=["vendored-libgit2"]}
leftwm-core = "0.5"
log = "0.4"
pretty_env_logger = "0.4.0"
pretty_env_logger = "0.5.0"
regex = "1.5.4"
reqwest = {version = "0.11.0", features= ["blocking", "json"]}
ron = "0.8.0"
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 f168eb4

Please sign in to comment.