blob: bb2e3b4ec19715c7f2bc830dce78b164a56addb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#[derive(Clone, Copy)]
pub enum AllocatorKind {
Global,
DefaultLib,
DefaultExe,
}
impl AllocatorKind {
pub fn fn_name(&self, base: &str) -> String {
match *self {
AllocatorKind::Global => format!("__rg_{}", base),
AllocatorKind::DefaultLib => format!("__rdl_{}", base),
AllocatorKind::DefaultExe => format!("__rde_{}", base),
}
}
}
|