diff -Nru rust-grep-pcre2-0.1.3/Cargo.toml rust-grep-pcre2-0.1.4/Cargo.toml --- rust-grep-pcre2-0.1.3/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ rust-grep-pcre2-0.1.4/Cargo.toml 2020-03-16 01:47:21.000000000 +0000 @@ -3,7 +3,7 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g. crates.io) dependencies +# to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're @@ -12,15 +12,15 @@ [package] name = "grep-pcre2" -version = "0.1.3" +version = "0.1.4" authors = ["Andrew Gallant "] description = "Use PCRE2 with the 'grep' crate.\n" -homepage = "https://github.com/BurntSushi/ripgrep" +homepage = "https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2" documentation = "https://docs.rs/grep-pcre2" readme = "README.md" keywords = ["regex", "grep", "pcre", "backreference", "look"] license = "Unlicense/MIT" -repository = "https://github.com/BurntSushi/ripgrep" +repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2" [dependencies.grep-matcher] version = "0.1.2" diff -Nru rust-grep-pcre2-0.1.3/Cargo.toml.orig rust-grep-pcre2-0.1.4/Cargo.toml.orig --- rust-grep-pcre2-0.1.3/Cargo.toml.orig 1970-01-01 00:00:00.000000000 +0000 +++ rust-grep-pcre2-0.1.4/Cargo.toml.orig 2020-03-16 01:37:15.000000000 +0000 @@ -1,28 +1,17 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies -# -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) - [package] name = "grep-pcre2" -version = "0.1.3" +version = "0.1.4" #:version authors = ["Andrew Gallant "] -description = "Use PCRE2 with the 'grep' crate.\n" -homepage = "https://github.com/BurntSushi/ripgrep" +description = """ +Use PCRE2 with the 'grep' crate. +""" documentation = "https://docs.rs/grep-pcre2" +homepage = "https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2" +repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2" readme = "README.md" keywords = ["regex", "grep", "pcre", "backreference", "look"] license = "Unlicense/MIT" -repository = "https://github.com/BurntSushi/ripgrep" -[dependencies.grep-matcher] -version = "0.1.2" -[dependencies.pcre2] -version = "0.2.0" +[dependencies] +grep-matcher = { version = "0.1.2", path = "../matcher" } +pcre2 = "0.2.0" diff -Nru rust-grep-pcre2-0.1.3/.cargo_vcs_info.json rust-grep-pcre2-0.1.4/.cargo_vcs_info.json --- rust-grep-pcre2-0.1.3/.cargo_vcs_info.json 1970-01-01 00:00:00.000000000 +0000 +++ rust-grep-pcre2-0.1.4/.cargo_vcs_info.json 2020-03-16 01:47:21.000000000 +0000 @@ -1,5 +1,5 @@ { "git": { - "sha1": "79018eb693c882b8f97535e2fb41b6ff0e90e948" + "sha1": "92daa34eb3031ae2c61bb81da4d9245b1fa7fff9" } } diff -Nru rust-grep-pcre2-0.1.3/debian/cargo-checksum.json rust-grep-pcre2-0.1.4/debian/cargo-checksum.json --- rust-grep-pcre2-0.1.3/debian/cargo-checksum.json 2019-08-15 08:31:33.000000000 +0000 +++ rust-grep-pcre2-0.1.4/debian/cargo-checksum.json 2020-03-26 11:31:22.000000000 +0000 @@ -1 +1 @@ -{"package":"140b36973a0c9467b0f3c2fd820bb2c9f29a9934515aa4de550f08abf41b4cf2","files":{}} +{"package":"4b4f4fb8154a3bcfa96817f0e3b020bff9c92ec05a1e5f6b763f20895058686a","files":{}} diff -Nru rust-grep-pcre2-0.1.3/debian/changelog rust-grep-pcre2-0.1.4/debian/changelog --- rust-grep-pcre2-0.1.3/debian/changelog 2019-08-15 08:31:33.000000000 +0000 +++ rust-grep-pcre2-0.1.4/debian/changelog 2020-03-26 11:31:22.000000000 +0000 @@ -1,3 +1,18 @@ +rust-grep-pcre2 (0.1.4-2) unstable; urgency=medium + + * Team upload. + * Package grep-pcre2 0.1.4 from crates.io using debcargo 2.4.0 + * Rebuild against the latest version of thread-local + + -- Sylvestre Ledru Thu, 26 Mar 2020 12:31:22 +0100 + +rust-grep-pcre2 (0.1.4-1) unstable; urgency=medium + + * Team upload. + * Package grep-pcre2 0.1.4 from crates.io using debcargo 2.4.0 + + -- Sylvestre Ledru Wed, 18 Mar 2020 23:48:54 +0100 + rust-grep-pcre2 (0.1.3-1) unstable; urgency=medium * Team upload. diff -Nru rust-grep-pcre2-0.1.3/debian/control rust-grep-pcre2-0.1.4/debian/control --- rust-grep-pcre2-0.1.3/debian/control 2019-08-15 08:31:33.000000000 +0000 +++ rust-grep-pcre2-0.1.4/debian/control 2020-03-26 11:31:22.000000000 +0000 @@ -2,7 +2,7 @@ Section: rust Priority: optional Build-Depends: debhelper (>= 11), - dh-cargo (>= 15), + dh-cargo (>= 18), cargo:native , rustc:native , libstd-rust-dev , @@ -14,7 +14,7 @@ Standards-Version: 4.2.0 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/grep-pcre2] Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/grep-pcre2 -Homepage: https://github.com/BurntSushi/ripgrep +Homepage: https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2 Package: librust-grep-pcre2-dev Architecture: any @@ -29,8 +29,8 @@ librust-grep-pcre2-0+default-dev (= ${binary:Version}), librust-grep-pcre2-0.1-dev (= ${binary:Version}), librust-grep-pcre2-0.1+default-dev (= ${binary:Version}), - librust-grep-pcre2-0.1.3-dev (= ${binary:Version}), - librust-grep-pcre2-0.1.3+default-dev (= ${binary:Version}) + librust-grep-pcre2-0.1.4-dev (= ${binary:Version}), + librust-grep-pcre2-0.1.4+default-dev (= ${binary:Version}) Description: Use PCRE2 with the 'grep' crate - Rust source code This package contains the source for the Rust grep-pcre2 crate, packaged by debcargo for use with cargo and dh-cargo. diff -Nru rust-grep-pcre2-0.1.3/debian/copyright.debcargo.hint rust-grep-pcre2-0.1.4/debian/copyright.debcargo.hint --- rust-grep-pcre2-0.1.3/debian/copyright.debcargo.hint 2019-08-15 08:31:33.000000000 +0000 +++ rust-grep-pcre2-0.1.4/debian/copyright.debcargo.hint 2020-03-26 11:31:22.000000000 +0000 @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: grep-pcre2 Upstream-Contact: Andrew Gallant -Source: https://github.com/BurntSushi/ripgrep +Source: https://github.com/BurntSushi/ripgrep/tree/master/crates/pcre2 Files: * Copyright: FIXME (overlay) UNKNOWN-YEARS Andrew Gallant @@ -21,8 +21,8 @@ Files: debian/* Copyright: - 2018-2019 Debian Rust Maintainers - 2018-2019 Wolfgang Silbermayr + 2018-2020 Debian Rust Maintainers + 2018-2020 Wolfgang Silbermayr License: Unlicense or MIT License: MIT diff -Nru rust-grep-pcre2-0.1.3/debian/rules rust-grep-pcre2-0.1.4/debian/rules --- rust-grep-pcre2-0.1.3/debian/rules 2019-08-15 08:31:33.000000000 +0000 +++ rust-grep-pcre2-0.1.4/debian/rules 2020-03-26 11:31:22.000000000 +0000 @@ -1,3 +1,6 @@ #!/usr/bin/make -f %: dh $@ --buildsystem cargo + +override_dh_auto_test: + dh_auto_test -- test --all diff -Nru rust-grep-pcre2-0.1.3/debian/tests/control rust-grep-pcre2-0.1.4/debian/tests/control --- rust-grep-pcre2-0.1.3/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ rust-grep-pcre2-0.1.4/debian/tests/control 2020-03-26 11:31:22.000000000 +0000 @@ -0,0 +1,7 @@ +Test-Command: /usr/share/cargo/bin/cargo-auto-test grep-pcre2 0.1.4 --all-targets --all-features +Depends: dh-cargo (>= 18), @ +Restrictions: allow-stderr, skip-not-installable + +Test-Command: /usr/share/cargo/bin/cargo-auto-test grep-pcre2 0.1.4 --all-targets --no-default-features +Depends: dh-cargo (>= 18), librust-grep-pcre2-dev +Restrictions: allow-stderr, skip-not-installable diff -Nru rust-grep-pcre2-0.1.3/src/matcher.rs rust-grep-pcre2-0.1.4/src/matcher.rs --- rust-grep-pcre2-0.1.3/src/matcher.rs 2019-04-14 23:38:24.000000000 +0000 +++ rust-grep-pcre2-0.1.4/src/matcher.rs 2020-03-15 13:36:53.000000000 +0000 @@ -33,13 +33,12 @@ if self.case_smart && !has_uppercase_literal(pattern) { builder.caseless(true); } - let res = - if self.word { - let pattern = format!(r"(? Result, Error> { - Ok(self.regex + Ok(self + .regex .find_at(haystack, at) .map_err(Error::regex)? .map(|m| Match::new(m.start(), m.end()))) @@ -297,7 +297,8 @@ haystack: &[u8], mut matched: F, ) -> Result, Error> - where F: FnMut(Match) -> Result + where + F: FnMut(Match) -> Result, { for result in self.regex.find_iter(haystack) { let m = result.map_err(Error::regex)?; @@ -316,10 +317,11 @@ at: usize, caps: &mut RegexCaptures, ) -> Result { - Ok(self.regex - .captures_read_at(&mut caps.locs, haystack, at) - .map_err(Error::regex)? - .is_some()) + Ok(self + .regex + .captures_read_at(&mut caps.locs, haystack, at) + .map_err(Error::regex)? + .is_some()) } } @@ -383,23 +385,19 @@ #[cfg(test)] mod tests { - use grep_matcher::{LineMatchKind, Matcher}; use super::*; + use grep_matcher::{LineMatchKind, Matcher}; // Test that enabling word matches does the right thing and demonstrate // the difference between it and surrounding the regex in `\b`. #[test] fn word() { - let matcher = RegexMatcherBuilder::new() - .word(true) - .build(r"-2") - .unwrap(); + let matcher = + RegexMatcherBuilder::new().word(true).build(r"-2").unwrap(); assert!(matcher.is_match(b"abc -2 foo").unwrap()); - let matcher = RegexMatcherBuilder::new() - .word(false) - .build(r"\b-2\b") - .unwrap(); + let matcher = + RegexMatcherBuilder::new().word(false).build(r"\b-2\b").unwrap(); assert!(!matcher.is_match(b"abc -2 foo").unwrap()); } @@ -432,16 +430,12 @@ // Test that smart case works. #[test] fn case_smart() { - let matcher = RegexMatcherBuilder::new() - .case_smart(true) - .build(r"abc") - .unwrap(); + let matcher = + RegexMatcherBuilder::new().case_smart(true).build(r"abc").unwrap(); assert!(matcher.is_match(b"ABC").unwrap()); - let matcher = RegexMatcherBuilder::new() - .case_smart(true) - .build(r"aBc") - .unwrap(); + let matcher = + RegexMatcherBuilder::new().case_smart(true).build(r"aBc").unwrap(); assert!(!matcher.is_match(b"ABC").unwrap()); } @@ -455,9 +449,7 @@ } } - let matcher = RegexMatcherBuilder::new() - .build(r"\wfoo\s") - .unwrap(); + let matcher = RegexMatcherBuilder::new().build(r"\wfoo\s").unwrap(); let m = matcher.find_candidate_line(b"afoo ").unwrap().unwrap(); assert!(is_confirmed(m)); }