Fix duplicate macro export

epel9
Josh Stone 7 years ago
parent c57e607294
commit 093f23b1b4

@ -0,0 +1,51 @@
From f8f6248d3c436fb6e8088adc56f7460b1689dfd9 Mon Sep 17 00:00:00 2001
From: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
Date: Fri, 18 May 2018 03:15:38 +0300
Subject: [PATCH] Remove deprecated duplicate macro exports
---
src/bytes.rs | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/src/bytes.rs b/src/bytes.rs
index 5c2bd431b0ce..ea37ffd94cd5 100644
--- a/src/bytes.rs
+++ b/src/bytes.rs
@@ -1108,34 +1108,6 @@ mod tests {
);
);
- #[macro_export]
- macro_rules! char (
- ($i:expr, $c: expr) => (
- {
- use $crate::lib::std::result::Result::*;
- use $crate::lib::std::option::Option::*;
- use $crate::{Err,Needed};
-
- use $crate::Slice;
- use $crate::AsChar;
- use $crate::InputIter;
-
- match ($i).iter_elements().next().map(|c| {
- let b = c.clone().as_char() == $c;
- (c, b)
- }) {
- None => $crate::need_more($i, Needed::Size(1)),
- Some((_, false)) => {
- let e: $crate::ErrorKind<u32> = $crate::ErrorKind::Char;
- Err(Err::Error($crate::Context::Code($i, e)))
- },
- //the unwrap should be safe here
- Some((c, true)) => Ok(( $i.slice(c.len()..), $i.iter_elements().next().unwrap().as_char() ))
- }
- }
- );
- );
-
#[test]
fn is_a() {
named!(a_or_b, is_a!(&b"ab"[..]));
--
2.17.1

@ -6,13 +6,16 @@
Name: rust-%{crate}
Version: 4.0.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Byte-oriented, zero-copy, parser combinators library
License: MIT
URL: https://crates.io/crates/nom
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# https://github.com/Geal/nom/pull/770
Patch1: 0001-Remove-deprecated-duplicate-macro-exports.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
@ -55,6 +58,9 @@ which use %{crate} from crates.io.
%{cargo_registry}/%{crate}-%{version}/
%changelog
* Fri Sep 07 2018 Josh Stone <jistone@redhat.com> - 4.0.0-3
- Fix duplicate macro export
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

Loading…
Cancel
Save