summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--android/translations-converter/src/gettext/match_str.rs50
1 files changed, 0 insertions, 50 deletions
diff --git a/android/translations-converter/src/gettext/match_str.rs b/android/translations-converter/src/gettext/match_str.rs
index d09a639fb3..e254399b4d 100644
--- a/android/translations-converter/src/gettext/match_str.rs
+++ b/android/translations-converter/src/gettext/match_str.rs
@@ -92,16 +92,6 @@ macro_rules! match_str {
)
};
- // Match a string with a given suffix
- (
- @match_str($conditions:tt, $input:ident $(, @no_bindings)*)
- | [.., $suffix:literal] $( $rest:tt )* ) => {
- match_str!(
- @match_str(($conditions || $input.ends_with($suffix)), $input, @no_bindings)
- $( $rest )*
- )
- };
-
// Match a string with a given prefix and suffix
(
@match_str($conditions:tt, $input:ident $(, @no_bindings)*)
@@ -118,36 +108,6 @@ macro_rules! match_str {
)
};
- // Match a string with a given prefix, binding the rest of the string after the prefix
- (
- @match_str($conditions:tt, $input:ident)
- | [$prefix:literal, $binding:ident] $( $rest:tt )*
- ) => {
- match_str!(
- @match_str(
- ($conditions || $input.starts_with($prefix)),
- $input,
- @binding $binding = &$input[$prefix.len()..]
- )
- $( $rest )*
- )
- };
-
- // Match a string with a given suffix, binding the start of the string up to before the suffix
- (
- @match_str($conditions:tt, $input:ident)
- | [$binding:ident, $suffix:literal] $( $rest:tt )*
- ) => {
- match_str!(
- @match_str(
- ($conditions || $input.ends_with($suffix)),
- $input,
- @binding $binding = &$input[..($input.len()-$suffix.len())]
- )
- $( $rest )*
- )
- };
-
// Match a string with a given prefix and suffix, binding the middle of the string, starting
// after the prefix and ending before the suffix
(
@@ -164,16 +124,6 @@ macro_rules! match_str {
)
};
- // Final empty `else` body
- ( @match_str((false), $input:ident) |) => { {} };
-
- // Final empty `else` body
- ( @match_str((false), $input:ident) | _ => $body:expr $(,)*) => {
- {
- $body
- }
- };
-
// Final `else` body with a catch-all binding
( @match_str((false), $input:ident) | $binding:ident => $body:expr $(,)* ) => {
{