Skip to content

Commit 405794a

Browse files
committed
Resolve merge conflicts
2 parents f650385 + bf86ebc commit 405794a

File tree

4 files changed

+44
-78
lines changed

4 files changed

+44
-78
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ repository = "https://github.com/o2sh/onefetch"
99
members = ["ascii", "image", "manifest"]
1010

1111
[workspace.dependencies]
12-
owo-colors = "4.2.0"
12+
owo-colors = "4.2.1"
1313
anyhow = "1.0"
1414
clap = { version = "4.5.34", features = ["derive"] }
15-
image = { version = "0.25.5", default-features = false, features = [
15+
image = { version = "0.25.6", default-features = false, features = [
1616
"color_quant",
1717
"jpeg",
1818
"png",
@@ -65,16 +65,16 @@ serde_yaml = "0.9.34"
6565
# TODO With the new value parsers, we're really close to being able to eliminate
6666
# the strum dependency
6767
strum.workspace = true
68-
time = { version = "0.3.37", features = ["formatting"] }
68+
time = { version = "0.3.41", features = ["formatting"] }
6969
time-humanize = { version = "0.1.3", features = ["time"] }
7070
tokei = "13.0.0-alpha.8"
7171
toml = "0.8.22"
7272
typetag = "0.2"
7373

7474
[dev-dependencies]
75-
criterion = "0.5.1"
75+
criterion = "0.6.0"
7676
gix-testtools = "0.16.1"
77-
insta = { version = "1.42.2", features = ["json", "redactions"] }
77+
insta = { version = "1.43.1", features = ["json", "redactions"] }
7878
rstest = "0.25.0"
7979

8080
[[bench]]

src/info/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ pub fn build_info(cli_options: &CliOptions, config_options: &ConfigOptions) -> R
151151
&repo,
152152
cli_options.info.hide_token,
153153
cli_options.info.http_url,
154-
)?;
154+
)
155+
.context("Failed to determine repository URL")?;
155156

156157
let git_metrics = traverse_commit_graph(
157158
&repo,
@@ -161,7 +162,8 @@ pub fn build_info(cli_options: &CliOptions, config_options: &ConfigOptions) -> R
161162
.info
162163
.no_merges
163164
.unwrap_or(config_options.no_merges),
164-
)?;
165+
)
166+
.context("Failed to traverse Git commit history")?;
165167
let true_color = match cli_options
166168
.ascii
167169
.true_color

src/ui/printer.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ impl<W: Write> Printer<W> {
3737
cli_options: CliOptions,
3838
config_options: ConfigOptions,
3939
) -> Result<Self> {
40-
let image = match cli_options.image.image {
41-
Some(p) => Some(image::open(p).context("Could not load the specified image")?),
42-
None => None,
43-
};
40+
let image =
41+
match cli_options.image.image {
42+
Some(p) => Some(image::open(&p).with_context(|| {
43+
format!("Could not load the image file at '{}'", p.display())
44+
})?),
45+
None => None,
46+
};
4447

4548
let image_backend = if image.is_some() {
4649
cli_options
@@ -92,7 +95,7 @@ impl<W: Write> Printer<W> {
9295
let image_backend = self
9396
.image_backend
9497
.as_ref()
95-
.context("Could not detect a supported image backend")?;
98+
.context("No supported image backend detected on your system")?;
9699

97100
buf.push_str(
98101
&image_backend
@@ -101,7 +104,7 @@ impl<W: Write> Printer<W> {
101104
custom_image,
102105
self.color_resolution,
103106
)
104-
.context("Error while drawing image")?,
107+
.context("Failed to render the image in the terminal")?,
105108
);
106109
} else {
107110
let mut logo_lines = if let Some(custom_ascii) = &self.ascii_input {

0 commit comments

Comments
 (0)