refactor: rename _ex() -> _ext()

"ex" means "used to be, but no longer is".
"ext" means "extended", which is the intended meaning.
"Ext" is more common not only in the Rust ecosystem but in general.
We already had several people (myself included) asking
what "ex" is supposed to mean.

To reproduce this commit, search and replace `_ex(?!\w)` -> `_ext`.
But don't change `list_transports_ex` because it's public API.
This commit is contained in:
WofWca
2026-08-14 14:40:43 +04:00
parent ce7c8dbca1
commit fbbe56c8ff
26 changed files with 160 additions and 155 deletions
+9 -5
View File
@@ -687,15 +687,19 @@ mod tests {
salt: [1; 8],
};
test_dont_decrypt_expensive_message_ex(s2k, false, None).await
test_dont_decrypt_expensive_message_ext(s2k, false, None).await
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_dont_decrypt_expensive_message_bad_s2k() -> Result<()> {
let s2k = StringToKey::new_default(&mut thread_rng()); // Default is IteratedAndSalted
test_dont_decrypt_expensive_message_ex(s2k, false, Some("unsupported string2key algorithm"))
.await
test_dont_decrypt_expensive_message_ext(
s2k,
false,
Some("unsupported string2key algorithm"),
)
.await
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
@@ -707,7 +711,7 @@ mod tests {
// This error message is actually not great,
// but grepping for it will lead to the correct code
test_dont_decrypt_expensive_message_ex(s2k, true, Some("decrypt_the_ring: missing key"))
test_dont_decrypt_expensive_message_ext(s2k, true, Some("decrypt_the_ring: missing key"))
.await
}
@@ -716,7 +720,7 @@ mod tests {
/// with an expensive string2key algorithm
/// or multiple shared secrets.
/// This is to prevent possible DOS attacks on the app.
async fn test_dont_decrypt_expensive_message_ex(
async fn test_dont_decrypt_expensive_message_ext(
s2k: StringToKey,
encrypt_twice: bool,
expected_error_msg: Option<&str>,