Converting file handles into a new type FileHandle
Keeping file handles (and pids, and scheme id, ...) as usize is a footgun. Let's remove it.
This commit is contained in:
parent
37a34ab7f7
commit
9c90a8fe42
7 changed files with 53 additions and 43 deletions
|
@ -67,6 +67,10 @@ int_like!(SchemeId, AtomicSchemeId, usize, AtomicUsize);
|
|||
|
||||
pub const ATOMIC_SCHEMEID_INIT: AtomicSchemeId = AtomicSchemeId::default();
|
||||
|
||||
/// Unique identifier for a file descriptor.
|
||||
int_like!(FileHandle, AtomicFileHandle, usize, AtomicUsize);
|
||||
|
||||
|
||||
/// Scheme list type
|
||||
pub struct SchemeList {
|
||||
map: BTreeMap<SchemeId, Arc<Box<Scheme + Send + Sync>>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue