Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency rust to v1.82.0 #293

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.81.0"
channel = "1.82.0"
components = ["rustfmt", "rust-src", "rust-std", "clippy"]
targets = [
"x86_64-unknown-linux-gnu",
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
config
.db_file()
.to_str()
.ok_or(eyre!("failed to get db path"))?,
.ok_or_else(|| eyre!("failed to get db path"))?,

Check warning on line 270 in src/main.rs

View check run for this annotation

Codecov / codecov/patch

src/main.rs#L270

Added line #L270 was not covered by tests
)
.await
.wrap_err("Failed to initialize DB")?;
Expand Down
4 changes: 2 additions & 2 deletions src/media/images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}

pub fn get_timestamp(&self) -> Result<DateTime<Utc>> {
let exif = self.exif.as_ref().ok_or(eyre!("no exif data"))?;
let exif = self.exif.as_ref().ok_or_else(|| eyre!("no exif data"))?;

Check warning on line 28 in src/media/images.rs

View check run for this annotation

Codecov / codecov/patch

src/media/images.rs#L28

Added line #L28 was not covered by tests

let timestamp = exif_get_str(exif, Tag::DateTimeOriginal)
.or_else(|_| exif_get_str(exif, Tag::DateTime))
Expand Down Expand Up @@ -84,7 +84,7 @@
match exif.get_field(tag, In::PRIMARY) {
Some(field) => match &field.value {
Value::Ascii(bytes) => {
let bytes = bytes.first().ok_or(eyre!("Something is wrong"))?;
let bytes = bytes.first().ok_or_else(|| eyre!("Something is wrong"))?;

Check warning on line 87 in src/media/images.rs

View check run for this annotation

Codecov / codecov/patch

src/media/images.rs#L87

Added line #L87 was not covered by tests
Ok(std::str::from_utf8(bytes)?)
}
_ => Err(eyre!("Not Ascii value")),
Expand Down