Converting scheme ids into a new type SchemeId
Keeping scheme ids (and pids, and file handles, ...) as usize is a footgun. Let's remove it.
This commit is contained in:
parent
9f7c20bacf
commit
d16515ea12
1 changed files with 40 additions and 28 deletions
|
|
@ -1,11 +1,13 @@
|
|||
//! File struct
|
||||
|
||||
use scheme::SchemeId;
|
||||
|
||||
/// A file
|
||||
//TODO: Close on exec
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct File {
|
||||
/// The scheme that this file refers to
|
||||
pub scheme: usize,
|
||||
pub scheme: SchemeId,
|
||||
/// The number the scheme uses to refer to this file
|
||||
pub number: usize,
|
||||
/// If events are on, this is the event ID
|
||||
|
|
|
|||
Loading…
Reference in a new issue