Bump serde_cbor to 0.8
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
9ef3977cdc
commit
9b17c2dc3f
|
@ -0,0 +1,49 @@
|
|||
From 46ee5ff92f94e7cf7c855aa1629325a8eb28d990 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <ignatenko@redhat.com>
|
||||
Date: Mon, 1 Jan 2018 23:53:59 +0100
|
||||
Subject: [PATCH] Bump serde_cbor to 0.8 (#167)
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/input.rs | 2 +-
|
||||
src/language/languages.rs | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/input.rs b/src/input.rs
|
||||
index 3ce6092..63ff3ed 100644
|
||||
--- a/src/input.rs
|
||||
+++ b/src/input.rs
|
||||
@@ -65,7 +65,7 @@ mod io {
|
||||
}
|
||||
|
||||
#[cfg(feature = "cbor")]
|
||||
- pub fn from_cbor(contents: &String) -> serde_cbor::Result<LanguageMap> {
|
||||
+ pub fn from_cbor(contents: &String) -> serde_cbor::error::Result<LanguageMap> {
|
||||
use self::hex::FromHex;
|
||||
use std::error::Error;
|
||||
use std::process;
|
||||
diff --git a/src/language/languages.rs b/src/language/languages.rs
|
||||
index ba996db..d590140 100644
|
||||
--- a/src/language/languages.rs
|
||||
+++ b/src/language/languages.rs
|
||||
@@ -191,7 +191,7 @@ impl Languages {
|
||||
/// # }
|
||||
/// ```
|
||||
#[cfg(feature = "cbor")]
|
||||
- pub fn from_cbor(cbor: &[u8]) -> serde_cbor::Result<Self> {
|
||||
+ pub fn from_cbor(cbor: &[u8]) -> serde_cbor::error::Result<Self> {
|
||||
Ok(Self::from_previous(serde_cbor::from_slice(cbor.into())?))
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ impl Languages {
|
||||
/// # }
|
||||
/// ```
|
||||
#[cfg(feature = "cbor")]
|
||||
- pub fn to_cbor(self) -> Result<Vec<u8>, serde_cbor::Error> {
|
||||
+ pub fn to_cbor(self) -> Result<Vec<u8>, serde_cbor::error::Error> {
|
||||
serde_cbor::to_vec(&self.remove_empty())
|
||||
}
|
||||
|
||||
--
|
||||
2.15.1
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 2a3b1b7d578de123537e9dcac42e4e455d4eae55 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
Date: Tue, 14 Nov 2017 18:27:21 +0100
|
||||
Subject: [PATCH 1/2] bump handlebars to 0.29
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/language/language_type.hbs.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/language/language_type.hbs.rs b/src/language/language_type.hbs.rs
|
||||
index e97b137..da42e4e 100644
|
||||
--- a/src/language/language_type.hbs.rs
|
||||
+++ b/src/language/language_type.hbs.rs
|
||||
@@ -247,7 +247,7 @@ pub fn get_filetype_from_shebang<P>(file: P) -> Option<&'static str>
|
||||
|
|
||||
{{~/unless}}
|
||||
{{~/each}}
|
||||
- => Some("{{this.extensions[0]}}"),
|
||||
+ => Some("{{this.extensions.[0]}}"),
|
||||
{{~/if}}
|
||||
{{~/each}}
|
||||
env => {
|
||||
--
|
||||
2.15.0
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
From c3b6fd7b774f6eb54127d4b71677ac907bf77aa5 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <ignatenko@redhat.com>
|
||||
Date: Sat, 2 Dec 2017 15:59:44 +0100
|
||||
Subject: [PATCH] bump ignore to 0.3, rayon to 0.9, handlebars to 0.29, hex to
|
||||
0.3 (#158)
|
||||
|
||||
* bump ignore to 0.3
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
|
||||
* bump rayon to 0.9
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
|
||||
* bump handlebars to 0.29
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
|
||||
* bump hex to 0.3
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
|
||||
* bump lazy_static to 1
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/language/language_type.hbs.rs | 2 +-
|
||||
src/language/languages.rs | 3 +--
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/language/language_type.hbs.rs b/src/language/language_type.hbs.rs
|
||||
index e97b137..da42e4e 100644
|
||||
--- a/src/language/language_type.hbs.rs
|
||||
+++ b/src/language/language_type.hbs.rs
|
||||
@@ -247,7 +247,7 @@ pub fn get_filetype_from_shebang<P>(file: P) -> Option<&'static str>
|
||||
|
|
||||
{{~/unless}}
|
||||
{{~/each}}
|
||||
- => Some("{{this.extensions[0]}}"),
|
||||
+ => Some("{{this.extensions.[0]}}"),
|
||||
{{~/if}}
|
||||
{{~/each}}
|
||||
env => {
|
||||
diff --git a/src/language/languages.rs b/src/language/languages.rs
|
||||
index effabeb..ba996db 100644
|
||||
--- a/src/language/languages.rs
|
||||
+++ b/src/language/languages.rs
|
||||
@@ -339,7 +339,6 @@ impl Languages {
|
||||
/// extern crate tokei;
|
||||
/// # use tokei::*;
|
||||
/// extern crate hex;
|
||||
- /// use hex::ToHex;
|
||||
///
|
||||
/// # fn main () {
|
||||
/// let cbor = "a16452757374a666626c616e6b730564636f64650c68636f6d6d656e747\
|
||||
@@ -350,7 +349,7 @@ impl Languages {
|
||||
/// let mut languages = Languages::new();
|
||||
/// languages.get_statistics(vec!["build.rs"], vec![]);
|
||||
///
|
||||
- /// assert_eq!(cbor, &languages.to_cbor().unwrap().to_hex());
|
||||
+ /// assert_eq!(cbor, hex::encode(&languages.to_cbor().unwrap()));
|
||||
/// # }
|
||||
/// ```
|
||||
#[cfg(feature = "cbor")]
|
||||
--
|
||||
2.15.1
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 1493633dc5945118222f77a3bc3b01de59429b1b Mon Sep 17 00:00:00 2001
|
||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
Date: Sat, 18 Nov 2017 09:57:51 +0100
|
||||
Subject: [PATCH 2/2] bump hex to 0.3
|
||||
|
||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||
---
|
||||
src/language/languages.rs | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/language/languages.rs b/src/language/languages.rs
|
||||
index effabeb..ba996db 100644
|
||||
--- a/src/language/languages.rs
|
||||
+++ b/src/language/languages.rs
|
||||
@@ -339,7 +339,6 @@ impl Languages {
|
||||
/// extern crate tokei;
|
||||
/// # use tokei::*;
|
||||
/// extern crate hex;
|
||||
- /// use hex::ToHex;
|
||||
///
|
||||
/// # fn main () {
|
||||
/// let cbor = "a16452757374a666626c616e6b730564636f64650c68636f6d6d656e747\
|
||||
@@ -350,7 +349,7 @@ impl Languages {
|
||||
/// let mut languages = Languages::new();
|
||||
/// languages.get_statistics(vec!["build.rs"], vec![]);
|
||||
///
|
||||
- /// assert_eq!(cbor, &languages.to_cbor().unwrap().to_hex());
|
||||
+ /// assert_eq!(cbor, hex::encode(&languages.to_cbor().unwrap()));
|
||||
/// # }
|
||||
/// ```
|
||||
#[cfg(feature = "cbor")]
|
||||
--
|
||||
2.15.0
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Name: rust-%{crate}
|
||||
Version: 6.1.2
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Utility that allows you to count code, quickly
|
||||
|
||||
License: MIT or ASL 2.0
|
||||
|
@ -19,12 +19,12 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{
|
|||
# * Bump handlebars to 0.29
|
||||
# * Bump hex to 0.3
|
||||
# * Bump lazy_static to 1
|
||||
# https://github.com/Aaronepower/tokei/pull/158
|
||||
# * Bump serde_cbor to 0.8
|
||||
Patch0: tokei-6.1.2-fix-metadata.diff
|
||||
# Make it work with handlebars v0.29
|
||||
Patch1: 0001-bump-handlebars-to-0.29.patch
|
||||
# Make it work with hex v0.3
|
||||
Patch2: 0002-bump-hex-to-0.3.patch
|
||||
# https://github.com/Aaronepower/tokei/commit/c3b6fd7b774f6eb54127d4b71677ac907bf77aa5
|
||||
Patch1: 0001-bump-ignore-to-0.3-rayon-to-0.9-handlebars-to-0.29-h.patch
|
||||
# https://github.com/Aaronepower/tokei/commit/46ee5ff92f94e7cf7c855aa1629325a8eb28d990
|
||||
Patch2: 0001-Bump-serde_cbor-to-0.8-167.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
|
@ -99,6 +99,9 @@ which use %{crate} from crates.io.
|
|||
%{cargo_registry}/%{crate}-%{version}/
|
||||
|
||||
%changelog
|
||||
* Tue Jan 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 6.1.2-7
|
||||
- Bump serde_cbor to 0.8
|
||||
|
||||
* Thu Nov 30 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 6.1.2-6
|
||||
- Bump lazy_static to 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue