refactor: Don't use traits where it's not necessary (#6567)

Traits are bad for readability and compile times.
This commit is contained in:
Hocuri
2025-02-25 19:52:17 +01:00
committed by GitHub
parent c5cf16f32a
commit 9f67d0f905
8 changed files with 58 additions and 51 deletions

View File

@@ -400,11 +400,11 @@ impl TestContext {
/// Sets a name for this [`TestContext`] if one isn't yet set.
///
/// This will show up in events logged in the test output.
pub fn set_name(&self, name: impl Into<String>) {
pub fn set_name(&self, name: &str) {
let mut context_names = CONTEXT_NAMES.write().unwrap();
context_names
.entry(self.ctx.get_id())
.or_insert_with(|| name.into());
.or_insert_with(|| name.to_string());
}
/// Returns the name of this [`TestContext`].