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:
David Teller 2016-11-13 21:47:04 +01:00
parent 37a34ab7f7
commit 9c90a8fe42
7 changed files with 53 additions and 43 deletions

View file

@ -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>>>,