release v0.7.1 🥳

This commit is contained in:
Lynne Megido 2024-01-21 16:55:11 +10:00
parent 10c6512231
commit a570b07672
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
7 changed files with 329 additions and 298 deletions

View File

@ -4,6 +4,10 @@ Dates are given in YYYY-MM-DD format - for example, the 15th of October 2021 is
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v0.7.1 - 2024-01-24
### Changed
- Updated and pinned dependencies, using the latest MSRV-compatible versions available.
## v0.7.0 - 2023-03-15
### Changed
- The Minimum Supported Rust Version (MSRV) is now **1.64.0**.

598
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
[package]
name = "fif"
description = "A command-line tool for detecting and optionally correcting files with incorrect extensions."
version = "0.7.0"
version = "0.7.1"
authors = ["Lynnesbian <lynne@bune.city>"]
edition = "2021"
license = "GPL-3.0-or-later"
@ -23,7 +23,7 @@ xdg-mime-backend = ["xdg-mime"]
json = ["serde", "serde_json"]
[dependencies]
walkdir = "~2.3.2"
walkdir = "2.4.0"
log = "0.4.14"
mime = "0.3.16"
mime_guess = { package = "new_mime_guess", version = "4.0.0" }
@ -32,7 +32,7 @@ once_cell = "1.8.0"
rayon = { version = "1.5.0", optional = true }
exitcode = "1.1.2"
cfg-if = "1.0.0"
itertools = "0.10.0"
itertools = "0.12.0"
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
num_cpus = { version = "1.13.0", optional = true }
@ -42,11 +42,11 @@ maplit = "1.0.2"
[target.'cfg(not(unix))'.dependencies]
xdg-mime = { version = "0.3.3", optional = true }
infer = "0.13.0"
infer = "=0.13.0" # 0.14.0 uses `let else`, which requires rust 1.65
[target.'cfg(unix)'.dependencies]
xdg-mime = "0.3.3"
infer = { version = "0.13.0", optional = true }
infer = { version = "=0.13.0", optional = true }
[dependencies.clap]
version = "~4.1"
@ -61,8 +61,8 @@ features = ["color"]
[dev-dependencies]
tempfile = "3.2.0"
rand = "0.8.3"
assert_cmd = "2.0.5"
regex = { version = "1.5.4", default-features = false, features = ["std"] }
assert_cmd = "=2.0.5" # higher versions than this have dependencies that require later rust versions
regex = { version = "=1.9.5", default-features = false, features = ["std"] } # 1.9.6 requires rust 1.65
[profile.release]
lto = "thin"
@ -75,4 +75,4 @@ opt-level = 3
opt-level = 3
[package.metadata]
msrv = "1.57.0"
msrv = "1.64.0"

View File

@ -317,7 +317,7 @@ pub fn mime_type<T: MimeDb>(db: &T, path: &Path) -> io::Result<Option<Mime>> {
// attempt to read up to BUF_SIZE bytes of the file.
let mut buffer = [0; BUF_SIZE];
file.seek(SeekFrom::Start(0))?;
file.read(&mut buffer)?;
_ = file.read(&mut buffer)?;
Ok(db.get_type(&buffer))
}

View File

@ -31,7 +31,6 @@ use crate::String;
/// // ...just use:
/// smart_write(&mut f, writables!["hello", Newline]);
/// ```
#[macro_export]
macro_rules! writables {
[$($args:tt),+] => {

View File

@ -182,7 +182,7 @@ fn main() {
loop {
// until file is renamed successfully
match std::fs::rename(&f.file, &rename_to) {
Ok(_) => {
Ok(()) => {
info!("Renamed {:#?} -> {:#?}", f.file, rename_to);
renamed += 1;
break;

View File

@ -357,7 +357,7 @@ fn check_version_output() {
let output = cmd.arg("-V").ok().unwrap().stdout;
let output = String::from_utf8(output).unwrap();
assert!(
Regex::new(r#"fif v([0-9]\.){2}[0-9]"#).unwrap().is_match(output.trim()),
Regex::new(r"fif v([0-9]\.){2}[0-9]").unwrap().is_match(output.trim()),
"\"{output}\" does not match the expected `-v` format!"
);
@ -366,7 +366,7 @@ fn check_version_output() {
let output = cmd.arg("--version").ok().unwrap().stdout;
let output = String::from_utf8(output).unwrap();
assert!(
Regex::new(r#"fif v([0-9]\.){2}[0-9] \(.+, .+ backend, (unknown commit|commit #[[:xdigit:]]{7})\)"#)
Regex::new(r"fif v([0-9]\.){2}[0-9] \(.+, .+ backend, (unknown commit|commit #[[:xdigit:]]{7})\)")
.unwrap()
.is_match(output.trim()),
"\"{}\" does not match the expected `--version` format!",