Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aws/amazon-q-developer-cli
/ has_duplicates
Function
has_duplicates
crates/chat-cli/src/cli/chat/tools/todo.rs:477–483 ·
view source on GitHub ↗
Generated by Q
(vec: &[T])
Source
from the content-addressed store, hash-verified
475
476
/// Generated by Q
477
fn has_duplicates<T>(vec: &[T]) -> bool
478
where
479
T: std::hash::Hash + Eq,
480
{
481
let mut seen = HashSet::with_capacity(vec.len());
482
vec.iter().any(|item| !seen.insert(item))
483
}
Callers
1
validate
Method · 0.85
Calls
2
insert
Method · 0.80
len
Method · 0.45
Tested by
no test coverage detected