From 627ebc5a4c51dabcd66be23f917822ff0dbfaaa1 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Fri, 15 Mar 2024 08:33:06 -0700 Subject: [PATCH] Revert "Upgrade to latest tree_magic_mini" This reverts commit b95c27a50abc49789507018bec2d7e098b93529d. --- Cargo.lock | 25 ++++++++++--------------- Cargo.toml | 10 +++++----- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76af37d4b2..99ef1611fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,6 +99,12 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +[[package]] +name = "bytecount" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e" + [[package]] name = "cc" version = "1.0.83" @@ -264,7 +270,6 @@ dependencies = [ "crossterm", "glob", "hashbrown 0.14.3", - "home", "humansize", "ignore", "itertools 0.11.0", @@ -406,15 +411,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys", -] - [[package]] name = "humansize" version = "2.1.3" @@ -1062,13 +1058,12 @@ dependencies = [ [[package]] name = "tree_magic_mini" -version = "3.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc72f26d1d99c2bf80e39944346b86ac2167a7afc5e8be4652b0ab085355d1b" +version = "3.0.2" +source = "git+https://github.com/Wilfred/tree_magic?branch=fix-panic-for-empty-strings#13dd6dda15c7062bd8f7dd5bc9bb5b16ce9ee613" dependencies = [ + "bytecount", "fnv", - "home", - "memchr", + "lazy_static", "nom", "once_cell", "petgraph", diff --git a/Cargo.toml b/Cargo.toml index ccdd102203..5bff08374d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,11 +64,7 @@ const_format = "0.2.22" owo-colors = "3.5.0" wu-diff = "0.1.2" rayon = "1.7.0" - -tree_magic_mini = "3.1.3" -# home (used by tree_magic_mini) 0.5.9 has an MSRV of 1.70. -home = ">= 0.5, < 0.5.9" - +tree_magic_mini = "3.0.2" # bumpalo 3.15 requires rust 1.65 bumpalo = ">= 3.11, < 3.15" unicode-width = "0.1.9" @@ -104,3 +100,7 @@ name = "difft" path = "src/main.rs" [features] + +[patch.crates-io] +# https://github.com/mbrubeck/tree_magic/pull/13 hasn't been merged yet. +tree_magic_mini = { git = 'https://github.com/Wilfred/tree_magic', branch = 'fix-panic-for-empty-strings' }