24 lines · 607 B · Rust
RawDownload
pub trait InsertImmutable<Item: Eq + std::hash::Hash> {    fn insert(&self, item: Item) -> bool;} mod trait_impls {    use std::{cell::RefCell, hash::Hash};     use dashmap::DashSet;    use git_hashtable::HashSet;     use super::InsertImmutable;     impl<T: Eq + Hash> InsertImmutable<T> for DashSet<T, git_hashtable::hash::Builder> {        fn insert(&self, item: T) -> bool {            self.insert(item)        }    }     impl<T: Eq + Hash> InsertImmutable<T> for RefCell<HashSet<T>> {        fn insert(&self, item: T) -> bool {            self.borrow_mut().insert(item)        }    }}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t