Description: avoid not-in-Debian crate assert_no_alloc
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2025-04-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -93,7 +93,6 @@
 env_logger = "0.11.7"
 auto-args = "0.3.0"
 serde = { version = "1.0.204", features = ["std", "derive"] }
-assert_no_alloc = "1.1.2"
 # Enable aws-lc-rs for tests so we can demonstrate using ureq without compiling ring.
 rustls = { version = "0.23", features = ["aws-lc-rs"] }
 
--- a/src/agent.rs
+++ b/src/agent.rs
@@ -390,15 +390,3 @@
         self.pool.pool_count()
     }
 }
-
-#[cfg(test)]
-mod test {
-    use super::*;
-    use assert_no_alloc::*;
-
-    #[test]
-    fn agent_clone_does_not_allocate() {
-        let a = Agent::new_with_defaults();
-        assert_no_alloc(|| a.clone());
-    }
-}
--- a/src/config.rs
+++ b/src/config.rs
@@ -997,15 +997,3 @@
             .finish()
     }
 }
-
-#[cfg(test)]
-mod test {
-    use super::*;
-    use assert_no_alloc::*;
-
-    #[test]
-    fn default_config_clone_does_not_allocate() {
-        let c = Config::default();
-        assert_no_alloc(|| c.clone());
-    }
-}
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -699,16 +699,11 @@
 pub(crate) mod test {
     use std::{io, sync::OnceLock};
 
-    use assert_no_alloc::AllocDisabler;
     use config::{Config, ConfigBuilder};
     use typestate::AgentScope;
 
     use super::*;
 
-    #[global_allocator]
-    // Some tests checks that we are not allocating
-    static A: AllocDisabler = AllocDisabler;
-
     pub fn init_test_log() {
         static INIT_LOG: OnceLock<()> = OnceLock::new();
         INIT_LOG.get_or_init(env_logger::init);
--- a/src/proxy.rs
+++ b/src/proxy.rs
@@ -482,13 +482,6 @@
 #[cfg(test)]
 mod test {
     use super::*;
-    use assert_no_alloc::*;
-
-    #[test]
-    fn proxy_clone_does_not_allocate() {
-        let c = Proxy::new("socks://1.2.3.4").unwrap();
-        assert_no_alloc(|| c.clone());
-    }
 
     #[test]
     fn proxy_new_default_scheme() {
--- a/src/tls/mod.rs
+++ b/src/tls/mod.rs
@@ -370,15 +370,3 @@
         }
     }
 }
-
-#[cfg(test)]
-mod test {
-    use super::*;
-    use assert_no_alloc::*;
-
-    #[test]
-    fn tls_config_clone_does_not_allocate() {
-        let c = TlsConfig::default();
-        assert_no_alloc(|| c.clone());
-    }
-}
