summaryrefslogtreecommitdiff
path: root/oryxc/src/prelude.rs
blob: 9c9111638640352a4d9557ad1b448c369e170978 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use std::fmt::{
	self,
	Debug,
	Formatter,
};

#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct FileId(pub usize);

#[repr(transparent)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct SymbolId(pub u32);

#[derive(Clone, Copy)]
pub struct SubNodes(pub u32, pub u32);

impl Debug for SubNodes {
	fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
		let __ = format_args!("_");
		return f
			.debug_tuple("SubNodes")
			.field(if self.0 != u32::MAX { &self.0 } else { &__ })
			.field(if self.1 != u32::MAX { &self.1 } else { &__ })
			.finish();
	}
}

impl Default for SubNodes {
	fn default() -> Self {
		return Self(u32::MAX, u32::MAX);
	}
}