Update to version 0.16.2; Fixes RHBZ#1955499

epel9
Fabio Valentini 3 years ago
parent ab0e58b334
commit 540992ef70
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -2,3 +2,4 @@
/indicatif-0.13.0.crate /indicatif-0.13.0.crate
/indicatif-0.14.0.crate /indicatif-0.14.0.crate
/indicatif-0.15.0.crate /indicatif-0.15.0.crate
/indicatif-0.16.2.crate

@ -1,58 +0,0 @@
From 5d9ef658048057348644bf4ddc85543197f31123 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 20 Jul 2021 15:44:44 +0200
Subject: [PATCH] port to number_prefix 0.4
---
src/format.rs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/format.rs b/src/format.rs
index 99eb0c4..7333248 100644
--- a/src/format.rs
+++ b/src/format.rs
@@ -1,7 +1,7 @@
use std::fmt;
use std::time::Duration;
-use number_prefix::{NumberPrefix, PrefixNames, Prefixed, Standalone};
+use number_prefix::NumberPrefix;
/// Wraps an std duration for human basic formatting.
#[derive(Debug)]
@@ -77,8 +77,8 @@ impl fmt::Display for HumanDuration {
impl fmt::Display for HumanBytes {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match NumberPrefix::binary(self.0 as f64) {
- Standalone(number) => write!(f, "{:.0}B", number),
- Prefixed(prefix, number) => write!(
+ NumberPrefix::Standalone(number) => write!(f, "{:.0}B", number),
+ NumberPrefix::Prefixed(prefix, number) => write!(
f,
"{:.2}{}B",
number,
@@ -91,8 +91,8 @@ impl fmt::Display for HumanBytes {
impl fmt::Display for DecimalBytes {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match NumberPrefix::decimal(self.0 as f64) {
- Standalone(number) => write!(f, "{:.0}B", number),
- Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
+ NumberPrefix::Standalone(number) => write!(f, "{:.0}B", number),
+ NumberPrefix::Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
}
}
}
@@ -100,8 +100,8 @@ impl fmt::Display for DecimalBytes {
impl fmt::Display for BinaryBytes {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match NumberPrefix::binary(self.0 as f64) {
- Standalone(number) => write!(f, "{:.0}B", number),
- Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
+ NumberPrefix::Standalone(number) => write!(f, "{:.0}B", number),
+ NumberPrefix::Prefixed(prefix, number) => write!(f, "{:.2}{}B", number, prefix),
}
}
}
--
2.31.1

@ -1,11 +0,0 @@
--- indicatif-0.15.0/Cargo.toml 2020-06-14T22:23:13+00:00
+++ indicatif-0.15.0/Cargo.toml 2021-07-20T13:40:06.248644+00:00
@@ -29,7 +29,7 @@
version = "1.0"
[dependencies.number_prefix]
-version = "0.3"
+version = "0.4"
[dependencies.rayon]
version = "1.0"

@ -1,11 +1,11 @@
# Generated by rust2rpm 18 # Generated by rust2rpm 20
%bcond_without check %bcond_without check
%global debug_package %{nil} %global debug_package %{nil}
%global crate indicatif %global crate indicatif
Name: rust-%{crate} Name: rust-%{crate}
Version: 0.15.0 Version: 0.16.2
Release: %autorelease Release: %autorelease
Summary: Progress bar and cli reporting library for Rust Summary: Progress bar and cli reporting library for Rust
@ -13,17 +13,8 @@ Summary: Progress bar and cli reporting library for Rust
License: MIT License: MIT
URL: https://crates.io/crates/indicatif URL: https://crates.io/crates/indicatif
Source: %{crates_source} Source: %{crates_source}
# Initial patched metadata
# * bump number_prefix from 0.3 to 0.4 (already upstream)
Patch0: indicatif-fix-metadata.diff
# * adapt to number_prefix 0.4 API changes:
# https://github.com/mitsuhiko/indicatif/commit/c3403b8
Patch1: 0001-port-to-number_prefix-0.4.patch
ExclusiveArch: %{rust_arches} ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging BuildRequires: rust-packaging
@ -38,8 +29,8 @@ BuildArch: noarch
%description devel %{_description} %description devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "%{crate}" crate. use the "%{crate}" crate.
%files devel %files devel
%license LICENSE %license LICENSE
@ -52,8 +43,8 @@ BuildArch: noarch
%description -n %{name}+default-devel %{_description} %description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "default" feature of "%{crate}" crate. use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel %files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
@ -64,8 +55,8 @@ BuildArch: noarch
%description -n %{name}+improved_unicode-devel %{_description} %description -n %{name}+improved_unicode-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "improved_unicode" feature of "%{crate}" crate. use the "improved_unicode" feature of the "%{crate}" crate.
%files -n %{name}+improved_unicode-devel %files -n %{name}+improved_unicode-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
@ -76,8 +67,8 @@ BuildArch: noarch
%description -n %{name}+rayon-devel %{_description} %description -n %{name}+rayon-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "rayon" feature of "%{crate}" crate. use the "rayon" feature of the "%{crate}" crate.
%files -n %{name}+rayon-devel %files -n %{name}+rayon-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
@ -88,8 +79,8 @@ BuildArch: noarch
%description -n %{name}+unicode-segmentation-devel %{_description} %description -n %{name}+unicode-segmentation-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "unicode-segmentation" feature of "%{crate}" crate. use the "unicode-segmentation" feature of the "%{crate}" crate.
%files -n %{name}+unicode-segmentation-devel %files -n %{name}+unicode-segmentation-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
@ -100,8 +91,8 @@ BuildArch: noarch
%description -n %{name}+unicode-width-devel %{_description} %description -n %{name}+unicode-width-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "unicode-width" feature of "%{crate}" crate. use the "unicode-width" feature of the "%{crate}" crate.
%files -n %{name}+unicode-width-devel %files -n %{name}+unicode-width-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
@ -112,8 +103,8 @@ BuildArch: noarch
%description -n %{name}+with_rayon-devel %{_description} %description -n %{name}+with_rayon-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "with_rayon" feature of "%{crate}" crate. use the "with_rayon" feature of the "%{crate}" crate.
%files -n %{name}+with_rayon-devel %files -n %{name}+with_rayon-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml

@ -1 +1 @@
SHA512 (indicatif-0.15.0.crate) = 9edae880d12412ad1f11d5cac004009a19540af3161176bac35390848e0a6959850a50fcfc2a66bd5ae5901b4e6af1a24286f7aede653f90b366089cbad6a5d2 SHA512 (indicatif-0.16.2.crate) = 5f60358f1fe3ffc0ec97d1d8922a7a2645d7dc0affed1d49a9205becdb36756d6a03482ef00fc918231770f967f7fc523f7b8c3bf4c06f71a0a93549c46fdacd

Loading…
Cancel
Save