Compare commits

...

4 Commits

Author SHA1 Message Date
Aloxaf 2b745027c3
deps: remove unnecessary git dependency 2024-02-28 19:39:54 +08:00
Aloxaf a7eb01e513
misc: update deps 2024-02-28 19:22:34 +08:00
Kian-Meng Ang a4ad35338b
misc: Ignore hello.png (#221)
Generated after `cargo test`
2024-02-28 19:20:56 +08:00
Kian-Meng Ang f7584ef672
misc: fix typos (#220)
Found via `typos --format brief`
2024-02-28 18:56:18 +08:00
5 changed files with 329 additions and 231 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
/target
**/*.rs.bk
/.idea
.vscode
.vscode
hello.png

525
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -17,51 +17,49 @@ bin = ["structopt", "env_logger", "anyhow", "shell-words"]
harfbuzz = ["harfbuzz-sys", "font-kit/loader-freetype-default", "font-kit/source-fontconfig-default"]
[dependencies]
dirs = "4.0"
dirs = "5.0.1"
imageproc = "0.23.0"
clipboard = "0.5.0"
tempfile = "3.8.1"
tempfile = "3.10.1"
conv = "0.3.3"
pathfinder_geometry = "0.5.1"
log = "0.4.20"
lazy_static = "1.4.0"
shell-words = { version = "1.1.0", optional = true }
rayon = "1.8.0"
font-kit = "0.11"
rayon = "1.9.0"
font-kit = "0.12.0"
harfbuzz-sys = { version = "0.5.0", optional = true }
pathfinder_simd = "0.5.2"
[dependencies.image]
version = "0.24"
version = "0.24.9"
default-features = false
features = ["jpeg", "png", "jpeg_rayon"]
[dependencies.syntect]
version = "5.1"
version = "5.2.0"
default-features = false
features = ["parsing", "dump-load", "regex-onig", "plist-load", "yaml-load"]
[dependencies.anyhow]
version = "1.0"
version = "1.0.80"
optional = true
[dependencies.structopt]
version = "0.3"
version = "0.3.26"
default-features = false
features = ["color", "wrap_help"]
optional = true
[dependencies.env_logger]
version = "0.9.3"
version = "0.11.2"
default-features = false
features = ["termcolor", "atty", "humantime"]
features = ["auto-color", "humantime"]
optional = true
[target.'cfg(target_os = "macos")'.dependencies]
pasteboard = "0.1.3"
[target.'cfg(target_os = "windows")'.dependencies]
clipboard-win = "4.5.0"
clipboard-win = "5.2.0"
image = { version = "0.24", default-features = false, features = ["jpeg", "bmp", "jpeg_rayon"] }
[patch.crates-io]
pathfinder_simd = { version = "0.5.0", git = "https://github.com/servo/pathfinder" }

View File

@ -265,7 +265,7 @@ impl Config {
Ok(theme.clone())
} else {
ThemeSet::get_theme(&self.theme)
.context(format!("Canot load the theme: {}", self.theme))
.context(format!("Cannot load the theme: {}", self.theme))
}
}

View File

@ -288,7 +288,7 @@ impl ImageFormatter {
*i = (*i).saturating_sub(20);
}
for i in 0..=lineno {
let line_mumber = format!(
let line_number = format!(
"{:>width$}",
i + self.line_offset,
width = self.line_number_chars as usize
@ -299,7 +299,7 @@ impl ImageFormatter {
self.code_pad,
self.get_line_y(i),
FontStyle::REGULAR,
&line_mumber,
&line_number,
);
}
}