summaryrefslogtreecommitdiffstats
path: root/openpgp/src/regex
AgeCommit message (Collapse)Author
2024-01-25openpgp: Deprecate Cert::into_packets.Justus Winter
2023-11-03openpgp: Remove redundant call.Justus Winter
- This triggers a warning in rustc 1.73, and thus is an error for us.
2023-10-26openpgp: Upgrade lalrpopPeter Michael Green
- Fixes #1060.
2023-10-24openpgp: Upgrade regex-syntax.Neal H. Walfield
- Upgrade regex-syntax to 0.8. - Fixes #1056.
2023-09-27openpgp: Impl Eq for Regex, RegexSet, add accessors for the raw REs.Justus Winter
- Fixes #973.
2022-09-06openpgp: Fix typos spotted by codespell.Wiktor Kwapisiewicz
2022-07-06openpgp: Fix parsing of dashes in regular expressions.Neal H. Walfield
- When a dash occurs outside of a range, it should be considered an atom. - Fixes #897.
2021-11-29Fix Acronym spelling.Nora Widdecke
- In CamelCase, acronyms count as one word. Apply this rule where API and lalrpop are not impacted. - Found by clippy::upper_case_acronyms.
2021-11-29Simplify filter_mapNora Widdecke
- Replace .filter_map(|x| x) with .flatten(), which is easier to read. - Found with clippy: filter_map_identity.
2021-09-30Drop unnecessary to_string() methodsLars Wirzenius
The methods were shadowing the implementation of the same function via the Display trait. One implementation is enough. Found by the clippy trait inherent_to_string_shadow_display: https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string_shadow_display
2021-09-30Join nested if statements with logical and into one statementLars Wirzenius
Instead of this: if foo { if bar { ... } } do this: if foo && bar { ... } Nesting statements implies a more complicated code structure than it really is. Thus it's arguably simpler to write a combined condition by joining the two conditions with a logical and operation. Found by clippy lint collapsible_if: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
2021-09-30Simplify writing out a literal {}Lars Wirzenius
It's arguably simpler to write a format string that doesn't take arguments than one with an argument that looks like a format string. Found by clippy lint write_literal: https://rust-lang.github.io/rust-clippy/master/index.html#write_literal
2021-08-27openpgp: Correct links.Nora Widdecke
- Some link targets have moved or were replaced since the link's creation. Make them point to the new location or replacement.
2021-08-27ffi, openpgp: Cleanup links after cargo intraconv.Nora Widdecke
- openpgp: Make broken relative links absolute: - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+packet),\1crate::packet,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+cert),\1crate::cert,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+parse),\1crate::parse,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+policy),\1crate::policy,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+serialize),\1crate::serialize,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+armor),\1crate::armor,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+types),\1crate::types,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!] *(\[`PacketPile`\]):).*$,\1 crate::PacketPile,' {} + - openpgp: Link to PacketParser and Policy structs, not the modules. - ffi: Make links to sequoia_openpgp and sequoia_net absolute - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_openpgp),\1sequoia_openpgp,' {} + - find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_net),\1sequoia_net,' {} +
2021-08-27Convert markdown to intra-doc links.Nora Widdecke
- Apply cargo intraconv.
2021-04-09Lint: Remove unecessary imports.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
2021-04-09Lint: Use matches! macro.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
2021-04-09Lint: Remove useless as_ref.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
2021-04-09Lint: Remove redundant closures.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
2021-04-09Lint: Remove unnecessary conversions.Nora Widdecke
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2021-03-23openpgp: Short-circuit regex alternations with empty branches.Neal H. Walfield
- The regex 'a|b|' is an alternation of three branches: 'a', 'b', and ''. The last branch matches anything, so the alternation matches anything, and therefore the whole thing can be elided. - This is required for regex <= 1.3.7, which doesn't support empty alternations. - Unfortunately, this is the version in Debian Bullseye. - Fixes #694.
2021-01-21openpgp: Improve Debug output of RegexSet.Neal H. Walfield
2021-01-19openpgp: Use IntoIterator into of impl Iterator.Neal H. Walfield
- This change only impacts `Regex` and `RegexSet`, which are still unreleased.
2021-01-19openpgp: Keep track of regular expressions that match everything.Neal H. Walfield
- When scoping a trust path, it is helpful to know when a `RegexSet` matches everything, i.e., when it doesn't constrain the path. - Add `RegexSet::everything` to create such a `RegexSet`, tweak `RegexSet::new` to identify the common case (no regular expressions supplied), and add `RegexSet::matches_everything` to return whether that is the case. - Note: the heuristic in `Regex::new` does doesn't identify all regular expressions that match everything.
2021-01-19openpgp: Assert that Regex and RegexSet are send and sync.Neal H. Walfield
2021-01-08openpgp: Add regex support.Neal H. Walfield
- Fixes #188.