diff options
| author | Emīls <emils@mullvad.net> | 2022-05-13 11:25:42 +0100 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2022-05-13 11:25:42 +0100 |
| commit | f5712dfea8ef545b70322bd8e08e16f883d5dfc2 (patch) | |
| tree | d8f9edb5626a29ac742f998fca6b06e55dfba70d | |
| parent | 7648da766789438b27b14d5e41edc5c64a95a0dd (diff) | |
| download | mullvadvpn-f5712dfea8ef545b70322bd8e08e16f883d5dfc2.tar.xz mullvadvpn-f5712dfea8ef545b70322bd8e08e16f883d5dfc2.zip | |
Remove unused macro expressions
With the advent of the latest nightly, the unused macro expressions are
producing warnings, which fail the CI. So the unused expressions are
removed, and can be added back if they are ever required again.
| -rw-r--r-- | android/translations-converter/src/gettext/match_str.rs | 50 |
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 $(,)* ) => { { |
