Add unicase feature back

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 6 years ago
parent a12f8ca185
commit 8a8a23e26a
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -1,47 +0,0 @@
From 6c30f50f02209070090849e9f0d996353280361b Mon Sep 17 00:00:00 2001
From: Steven Fackler <sfackler@gmail.com>
Date: Sat, 13 Jan 2018 15:41:15 -0800
Subject: [PATCH] Remove unicase support
It's out of date, and was only added for Servo which no longer uses it.
Closes #113
Closes #109
Closes #114
---
phf_shared/src/lib.rs | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/phf_shared/src/lib.rs b/phf_shared/src/lib.rs
index 7656c69..43074fd 100644
--- a/phf_shared/src/lib.rs
+++ b/phf_shared/src/lib.rs
@@ -6,9 +6,6 @@ extern crate std as core;
extern crate siphasher;
-#[cfg(feature = "unicase")]
-extern crate unicase;
-
use core::hash::{Hasher, Hash};
use siphasher::sip::SipHasher13;
@@ -110,15 +107,6 @@ impl PhfHash for [u8] {
}
}
-#[cfg(feature = "unicase")]
-impl<S> PhfHash for unicase::UniCase<S>
-where unicase::UniCase<S>: Hash {
- #[inline]
- fn phf_hash<H: Hasher>(&self, state: &mut H) {
- self.hash(state)
- }
-}
-
macro_rules! sip_impl(
(le $t:ty) => (
impl PhfHash for $t {
--
2.16.1

@ -1,12 +0,0 @@
--- phf_shared-0.7.22/Cargo.toml 1969-12-31T16:00:00-08:00
+++ phf_shared-0.7.22/Cargo.toml 2018-05-02T14:15:06.534053-07:00
@@ -26,9 +26,5 @@
[dependencies.siphasher]
version = "0.2"
-[dependencies.unicase]
-version = "1.4"
-optional = true
-
[features]
core = []

@ -6,23 +6,19 @@
Name: rust-%{crate}
Version: 0.7.24
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Support code shared by PHF libraries
# https://github.com/sfackler/rust-phf/pull/118
License: MIT
URL: https://crates.io/crates/phf_shared
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Remove unicase dependency, https://github.com/sfackler/rust-phf/pull/117
Patch0: phf_shared-0.7.22-fix-metadata.diff
# Really remove unicase
Patch1: 0001-Remove-unicase-support.patch
Source: %{crates_source}
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
BuildRequires: (crate(siphasher/default) >= 0.2.0 with crate(siphasher/default) < 0.3.0)
BuildRequires: (crate(unicase/default) >= 1.4.0 with crate(unicase/default) < 2.0.0)
%global _description \
Support code shared by PHF libraries.
@ -65,10 +61,20 @@ which use "core" feature of "%{crate}" crate.
%files -n %{name}+core-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+unicase-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+unicase-devel %{_description}
This package contains library source intended for building other packages
which use "unicase" feature of "%{crate}" crate.
%files -n %{name}+unicase-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -N
%patch0 -p1
%patch1 -p2
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
%build
@ -83,6 +89,9 @@ which use "core" feature of "%{crate}" crate.
%endif
%changelog
* Sat Jan 26 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.7.24-2
- Add unicase feature back
* Tue Jan 08 2019 Josh Stone <jistone@redhat.com> - 0.7.24-1
- Update to 0.7.24

Loading…
Cancel
Save