You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: forbid the locking Id constructors with a clippy lint
`Id::new`/`Id::new_static` intern into a globally locked table on every
call. A disallowed-methods lint now forbids them: static ids use a
`CachedId` static, and the few dynamic-string sites keep `Id::new` behind
`#[expect]`. `CachedId` interns via `Id::new_static`.
Refs: #8380
Signed-off-by: Han Damin <miniex@daminstudio.net>
Copy file name to clipboardExpand all lines: clippy.toml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -15,4 +15,6 @@ disallowed-methods = [
15
15
{ path = "itertools::Itertools::counts", reason = "It uses the default hasher which is slow for primitives. Just inline the loop for better performance.", allow-invalid = true },
16
16
{ path = "std::result::Result::and", reason = "This method is a footgun, especially when working with `Result<Validity>`." },
17
17
{ path = "std::thread::available_parallelism", reason = "This function might do an unbounded amount of work, use `vortex_utils::parallelism::get_available_parallelism instead" },
18
+
{ path = "vortex_session::registry::Id::new", reason = "Interning a static id on every call grabs the interner lock (#8380). Use a `CachedId` static for static ids; for a dynamic string, annotate the call with `#[expect(clippy::disallowed_methods)]`.", allow-invalid = true },
19
+
{ path = "vortex_session::registry::Id::new_static", reason = "Interning a static id on every call grabs the interner lock; use a `CachedId` static instead (#8380).", allow-invalid = true },
0 commit comments