Skip to content

Commit e25d367

Browse files
committed
Upgrade to latest tinted-scheme-extractor
1 parent 8b04632 commit e25d367

File tree

4 files changed

+16
-29
lines changed

4 files changed

+16
-29
lines changed

Cargo.lock

Lines changed: 5 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ serde_yaml = "0.9.31"
2222
shell-words = "1.1.0"
2323
strip-ansi-escapes = "0.2.0"
2424
tinted-builder-rust = "0.11.0"
25-
tinted-scheme-extractor = "0.3.2"
25+
tinted-builder= "0.7.0"
26+
tinted-scheme-extractor = "0.4.0"
2627
toml = "0.8.19"
2728
url = "2.5.2"

src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use config::CONFIG_FILE_NAME;
2323
use constants::{CUSTOM_SCHEMES_DIR_NAME, REPO_DIR, REPO_NAME, SCHEMES_REPO_NAME};
2424
use operations::generate_scheme;
2525
use std::path::PathBuf;
26-
use tinted_scheme_extractor::{System, Variant};
26+
use tinted_builder::{SchemeSystem, SchemeVariant};
2727
use utils::{ensure_directory_exists, replace_tilde_slash_with_home};
2828

2929
/// Entry point of the application.
@@ -161,12 +161,12 @@ fn main() -> Result<()> {
161161
None => Err(anyhow!("No image file specified")),
162162
}?;
163163
let system = match sub_matches.get_one::<String>("system").map(|s| s.as_str()) {
164-
Some("base24") => System::Base24,
165-
_ => System::Base16,
164+
Some("base24") => SchemeSystem::Base24,
165+
_ => SchemeSystem::Base16,
166166
};
167167
let variant = match sub_matches.get_one::<String>("variant").map(|s| s.as_str()) {
168-
Some("light") => Variant::Light,
169-
_ => Variant::Dark,
168+
Some("light") => SchemeVariant::Light,
169+
_ => SchemeVariant::Dark,
170170
};
171171
let outfile_path_option = {
172172
let custom_scheme_path = data_path.join(CUSTOM_SCHEMES_DIR_NAME);

src/operations/generate_scheme.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use std::path::PathBuf;
22

33
use anyhow::Result;
4-
use tinted_scheme_extractor::{create_scheme_from_image, SchemeParams, System, Variant};
4+
use tinted_builder::{SchemeSystem, SchemeVariant};
5+
use tinted_scheme_extractor::{create_scheme_from_image, SchemeParams};
56

67
use crate::utils::write_to_file;
78

@@ -11,8 +12,8 @@ pub(crate) fn generate_scheme(
1112
author: String,
1213
name: String,
1314
slug: String,
14-
system: System,
15-
variant: Variant,
15+
system: SchemeSystem,
16+
variant: SchemeVariant,
1617
) -> Result<()> {
1718
let params = SchemeParams {
1819
author,

0 commit comments

Comments
 (0)