Update to 7.0.1
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
a2dea2464f
commit
2a62eeef31
|
@ -1,2 +1,3 @@
|
|||
/tokei-6.1.2.crate
|
||||
/tokei-7.0.0.crate
|
||||
/tokei-7.0.1.crate
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
From 13d6bb3973f45811cebd926e4a64489b23f19172 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
Date: Wed, 17 Jan 2018 13:54:42 +0100
|
||||
Subject: [PATCH] fix build with features enabled
|
||||
|
||||
Since 8817762d7b8f5cd10886147b828f95d19dc2a80a, build fails with any
|
||||
features enabled..
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> src/main.rs:95:30
|
||||
|
|
||||
95 | match_output(format, &languages);
|
||||
| ^^^^^^^^^^
|
||||
| |
|
||||
| expected struct `tokei::Languages`, found reference
|
||||
| help: consider removing the borrow: `languages`
|
||||
|
|
||||
= note: expected type `tokei::Languages`
|
||||
found type `&tokei::Languages`
|
||||
|
||||
Problem is that when no features enabled, match_output() doesn't need
|
||||
to "eat" `tokei::Languages`, but in real version of match_output it
|
||||
must not be borrowed.
|
||||
|
||||
Fixes: https://github.com/Aaronepower/tokei/issues/177
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/input.rs | 3 ++-
|
||||
src/main.rs | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/input.rs b/src/input.rs
|
||||
index baf4e92..86697fd 100644
|
||||
--- a/src/input.rs
|
||||
+++ b/src/input.rs
|
||||
@@ -171,7 +171,8 @@ mod io {
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
- pub fn match_output(_format: &str, _languages: &Languages) -> ! {
|
||||
+ #[cfg_attr(feature = "cargo-clippy", allow(needless_pass_by_value))]
|
||||
+ pub fn match_output(_format: &str, _languages: Languages) -> ! {
|
||||
eprintln!("{}", OUTPUT_ERROR);
|
||||
process::exit(1);
|
||||
}
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
index cad9b2f..a3d86b3 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -92,7 +92,7 @@ fn main() {
|
||||
languages.get_statistics(&paths, ignored_directories);
|
||||
|
||||
if let Some(format) = output_option {
|
||||
- match_output(format, &languages);
|
||||
+ match_output(format, languages);
|
||||
}
|
||||
|
||||
println!("{}", ROW);
|
||||
--
|
||||
2.15.1
|
||||
|
|
@ -6,18 +6,16 @@
|
|||
%global crate tokei
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 7.0.0
|
||||
Release: 3%{?dist}
|
||||
Version: 7.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Utility that allows you to count code, quickly
|
||||
|
||||
License: MIT or ASL 2.0
|
||||
URL: https://crates.io/crates/tokei
|
||||
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
|
||||
# Initial patched metadata
|
||||
# * Bump env_logger to 0.5.0, https://github.com/Aaronepower/tokei/pull/176
|
||||
Patch0: tokei-7.0.0-fix-metadata.diff
|
||||
# https://github.com/Aaronepower/tokei/pull/178
|
||||
Patch0001: 0001-fix-build-with-features-enabled.patch
|
||||
# * Bump handlebars to 0.30, https://github.com/Aaronepower/tokei/pull/179
|
||||
Patch0: tokei-7.0.1-fix-metadata.diff
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
|
@ -38,7 +36,7 @@ BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0)
|
|||
BuildRequires: (crate(serde_yaml) >= 0.7.0 with crate(serde_yaml) < 0.8.0)
|
||||
BuildRequires: (crate(toml) >= 0.4.0 with crate(toml) < 0.5.0)
|
||||
# [build-dependencies]
|
||||
BuildRequires: (crate(handlebars) >= 0.29.0 with crate(handlebars) < 0.30.0)
|
||||
BuildRequires: (crate(handlebars) >= 0.30.0 with crate(handlebars) < 0.31.0)
|
||||
BuildRequires: (crate(ignore) >= 0.3.0 with crate(ignore) < 0.4.0)
|
||||
BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0)
|
||||
BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0)
|
||||
|
@ -91,6 +89,9 @@ which use %{crate} from crates.io.
|
|||
%{cargo_registry}/%{crate}-%{version}/
|
||||
|
||||
%changelog
|
||||
* Mon Jan 22 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 7.0.1-1
|
||||
- Update to 7.0.1
|
||||
|
||||
* Fri Jan 19 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 7.0.0-3
|
||||
- Rebuild for env_logger 0.5.2
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (tokei-7.0.0.crate) = bb6553e3738661bd11415ad72fddc1da321b7742b2f17c883f3970acbd4382048bd127e1f95892148ae09d81fbba368bc027c2a91ace642c9e6a99df1fe918df
|
||||
SHA512 (tokei-7.0.1.crate) = f929104df1f9cdd7e7ec87e1e7cf28df3348b51db1a4f01decaf4b6ded47356224d6b57607e24f08be9e333bacef64118547fae040437aa8b5cb47cddcc51636
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- tokei-7.0.0/Cargo.toml 1970-01-01T01:00:00+01:00
|
||||
+++ tokei-7.0.0/Cargo.toml 2018-01-17T10:30:26.064945+01:00
|
||||
@@ -33,7 +33,7 @@
|
||||
version = "0.2"
|
||||
|
||||
[dependencies.env_logger]
|
||||
-version = "0.5.0-rc.2"
|
||||
+version = "0.5.0"
|
||||
features = []
|
||||
|
||||
[dependencies.hex]
|
|
@ -0,0 +1,11 @@
|
|||
--- tokei-7.0.1/Cargo.toml 1970-01-01T01:00:00+01:00
|
||||
+++ tokei-7.0.1/Cargo.toml 2018-01-22T15:27:00.983881+01:00
|
||||
@@ -81,7 +81,7 @@
|
||||
[dev-dependencies.tempdir]
|
||||
version = "0.3"
|
||||
[build-dependencies.handlebars]
|
||||
-version = "0.29"
|
||||
+version = "0.30"
|
||||
|
||||
[build-dependencies.ignore]
|
||||
version = "0.3"
|
Loading…
Reference in New Issue