-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to dependencies, MSRV, and language edition
- Loading branch information
Showing
8 changed files
with
32 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
[package] | ||
name = "gexiv2-sys" | ||
description = """ | ||
This library provides Rust FFI declarations for the gexiv2 library, which | ||
is a GObject-based wrapper around the Exiv2 library, which provides read | ||
and write access to the Exif, XMP, and IPTC metadata in media files. Only | ||
FFI declarations are provided here; for a usable Rust library, consider | ||
the `rexiv2` crate. | ||
This crate provides Rust FFI declarations for the gexiv2 library, which is a | ||
GObject-based wrapper around Exiv2, which provides read and write access to the | ||
Exif, XMP, and IPTC metadata in media files. Only FFI declarations are provided | ||
here; for a usable Rust library, consider the `rexiv2` crate. | ||
""" | ||
|
||
version = "1.1.2" | ||
version = "1.2.0" | ||
authors = ["Felix Crux <[email protected]>"] | ||
license = "GPL-3.0+" | ||
documentation = "https://felixcrux.com/files/doc/gexiv2_sys/" | ||
|
@@ -20,7 +19,8 @@ readme = "README.md" | |
links = "gexiv2" | ||
build = "build.rs" | ||
|
||
edition = "2018" | ||
edition = "2021" | ||
rust-version = "1.56" | ||
|
||
include = [ | ||
"Cargo.toml", | ||
|
@@ -34,14 +34,14 @@ include = [ | |
|
||
[dependencies] | ||
libc = "0.2" | ||
bitflags = { version = "1.0", optional = true} | ||
glib-sys = { version = "0.10", optional = true } | ||
bitflags = { version = "1.3", optional = true} | ||
glib-sys = { version = "0.15", optional = true } | ||
|
||
[build-dependencies] | ||
pkg-config = "0.3" | ||
|
||
[dev-dependencies] | ||
tempdir = "0.3" | ||
tempfile = "3.3" | ||
|
||
[features] | ||
raw-tag-access = ["glib-sys"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright © 2015 Felix A. Crux <[email protected]> | ||
// Copyright © 2015-2022 Felix A. Crux <[email protected]> | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
|
@@ -25,7 +25,7 @@ fn main() { | |
"\nThe gexiv2 library was not found by pkg-config on your system.\n\n\ | ||
Consult the README.md file for suggestions on how to acquire it." | ||
); | ||
panic!(e); | ||
panic!("{}", e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright © 2015–2019 Felix A. Crux <[email protected]> and contributors | ||
// Copyright © 2015–2022 Felix A. Crux <[email protected]> and contributors | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright © 2017-2019 Felix A. Crux <[email protected]> and contributors | ||
// Copyright © 2017-2022 Felix A. Crux <[email protected]> and contributors | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
|
@@ -16,7 +16,7 @@ | |
//! Basic tests for gexiv2. | ||
extern crate libc; | ||
extern crate tempdir; | ||
extern crate tempfile; | ||
|
||
use std::ffi; | ||
use std::fs; | ||
|
@@ -47,7 +47,7 @@ unsafe fn make_new_metadata() -> *mut GExiv2Metadata { | |
); | ||
if ok != 1 { | ||
match ffi::CStr::from_ptr((*err).message).to_str() { | ||
Ok(v) => panic!(v.to_string()), | ||
Ok(v) => panic!("{}", v.to_string()), | ||
Err(_) => panic!("Unknown error"), | ||
} | ||
} | ||
|
@@ -223,7 +223,7 @@ fn metadata_set_exif_thumbnail_from_file() { | |
unsafe { | ||
let meta = make_new_metadata(); | ||
|
||
let tmp_dir = tempdir::TempDir::new("gexiv2_sys_tests").unwrap(); | ||
let tmp_dir = tempfile::tempdir().unwrap(); | ||
let tmp_file_path = tmp_dir.path().join("thumb.jpg"); | ||
let mut thumb_file = fs::File::create(tmp_file_path.clone()).unwrap(); | ||
thumb_file.write_all(MINI_JPEG).unwrap(); | ||
|