update all dependencies, remove deprecated code

This commit is contained in:
Lynne Megido 2022-09-04 13:41:41 +10:00
parent 866a8d41d5
commit 420bd0483c
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
7 changed files with 26 additions and 46 deletions

View File

@ -105,7 +105,7 @@ build-base-stable:
build-base-msrv:
extends: build-base-stable
image: "rust:1.54.0"
image: "rust:1.57.0"
cache:
key: msrv
paths:
@ -131,7 +131,7 @@ build-stable:
build-msrv:
extends: build-stable
needs: ["build-base-msrv"]
image: "rust:1.54.0"
image: "rust:1.57.0"
cache:
key: msrv
paths:
@ -156,7 +156,7 @@ test-stable:
test-msrv:
extends: test-stable
image: "rust:1.54.0"
image: "rust:1.57.0"
needs: ["build-msrv"]
cache:
key: msrv

View File

@ -4,6 +4,13 @@ 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.6.0 - 2022-09-04
### Changed
- The Minimum Supported Rust Version (MSRV) is now **1.57.0**.
- Update [`clap`] to v3.2.0
- Update [`smartstring`] to v1.0 - this should (slightly) improve performance on 32-bit big endian architectures
such as PowerPC
## v0.5.2 - 2022-05-02
### Added
- Output now contains a reminder to use `fif --fix`
@ -26,7 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## v0.5.0 - 2022-01-01
### Changed
- The Minimum Supported Rust Version (MSRV) is now **1.54.0**.
- The Minimum Supported Rust Version (MSRV) is now **1.57.0**.
- Updated [`new_mime_guess`] to 4.0.0
- `--version` output now handles missing Git commit hashes, and specifies the target operating system
### Fixed

16
Cargo.lock generated
View File

@ -81,16 +81,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
version = "3.1.18"
version = "3.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b"
checksum = "23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"clap_lex",
"indexmap",
"lazy_static",
"once_cell",
"termcolor",
"terminal_size",
"textwrap",
@ -99,9 +99,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "3.1.18"
version = "3.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c"
checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
dependencies = [
"heck",
"proc-macro-error",
@ -769,11 +769,13 @@ checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
[[package]]
name = "smartstring"
version = "0.2.9"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31aa6a31c0c2b21327ce875f7e8952322acfcfd0c27569a6e18a647281352c9b"
checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29"
dependencies = [
"autocfg",
"static_assertions",
"version_check",
]
[[package]]

View File

@ -5,7 +5,7 @@ version = "0.5.2"
authors = ["Lynnesbian <lynne@bune.city>"]
edition = "2018"
license = "GPL-3.0-or-later"
rust-version = "1.54.0" # clap 3 requires >=1.54.0
rust-version = "1.57.0" # os_str_bytes requires >=1.57.0, numerous other deps require 2021 edition support
repository = "https://gitlab.com/Lynnesbian/fif"
readme = "README.md"
keywords = ["mime", "mimetype", "utilities", "tools"]
@ -38,6 +38,7 @@ serde_json = { version = "1.0", optional = true }
num_cpus = { version = "1.13.0", optional = true }
maplit = "1.0.2"
parking_lot = "0.12.0"
smartstring = "1"
[target.'cfg(not(unix))'.dependencies]
xdg-mime = { version = "0.3.3", optional = true }
@ -47,20 +48,8 @@ infer = "0.9.0"
xdg-mime = "0.3.3"
infer = { version = "0.9.0", optional = true }
[target.'cfg(not(all(target_endian = "big", target_pointer_width = "32")))'.dependencies]
# the seemingly weird target constraint here is due to this:
# https://github.com/bodil/smartstring/blob/v0.2.9/src/config.rs#L91-L93
# essentially, smartstring is intentionally blocked from compiling on 32-bit big endian archs, so our dependency on it
# needs to be too. otherwise, fif won't work on platforms like powerpc, even though this dependency is the only
# blocker -- fif runs just fine on powerpc (or on my powerbook G4, anyway) without smartstring.
# additionally, versions before 0.2.4 didn't impl Display, so we need at least that version for displaying Strings.
# version 1.0 of smartstring adds 32-bit BE compatibility (by rewriting the implementation), but requires rust 1.57.0,
# so we can't use it.
smartstring = ">= 0.2.4, <=0.2.9"
[dependencies.clap]
version = "~3.1" # 3.2 requires rust 1.56.0
version = "3.2"
default-features = false
features = ["wrap_help", "color", "derive", "std", "unicode"]
@ -86,4 +75,4 @@ opt-level = 3
opt-level = 3
[package.metadata]
msrv = "1.54.0"
msrv = "1.57.0"

View File

@ -7,7 +7,7 @@
[![Version](https://img.shields.io/crates/v/fif.svg?logo=rust&style=flat-square)
](https://crates.io/crates/fif)
[![Minimum Supported Rust Version](https://img.shields.io/badge/msrv-1.54.0-orange?logo=rust&style=flat-square)
[![Minimum Supported Rust Version](https://img.shields.io/badge/msrv-1.57.0-orange?logo=rust&style=flat-square)
](https://gitlab.com/Lynnesbian/fif/-/blob/master/README.md#version-policy)
[![License](https://img.shields.io/crates/l/fif.svg?style=flat-square)
](https://gitlab.com/Lynnesbian/fif/-/blob/master/LICENSE)

View File

@ -1,3 +1,3 @@
# avoid-breaking-exported-api = false # only available on nightly for now
cognitive-complexity-threshold = 15
msrv = "1.54.0"
msrv = "1.57.0"

View File

@ -564,21 +564,3 @@ fn sort_findings() {
assert_eq!(findings.next().unwrap().file, Path::new("ccc"));
assert_eq!(findings.next(), None);
}
#[test]
#[cfg(not(all(target_endian = "big", target_pointer_width = "32")))]
/// Ensures that [`SmartString`]s don't deviate from std's Strings
// remove this when (if) updating to smartstring v1.0!
fn validate_string_type() {
use std::string::String as StdString;
use fif::String as SmartString;
assert_eq!(SmartString::new(), StdString::new());
assert_eq!(SmartString::from("smol"), StdString::from("smol"));
assert_eq!(
SmartString::from("A long and therefore heap-allocated string"),
StdString::from("A long and therefore heap-allocated string")
);
smartstring::validate();
}