@@ -0,0 +1,2 @@
+/target
+**/*.rs.bk
@@ -0,0 +1,7 @@
+[package]
+name = "xd"
+version = "0.1.0"
+authors = ["Nicolas Winkler <nicolas.winkler@gmx.ch>"]
+edition = "2018"
+
+[dependencies]
@@ -0,0 +1,11 @@
+pub fn get_hex(x: u8) -> char {
+ const LUTABLE: [char; 16] =
+ ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D',
+ 'E', 'F'];
+ LUTABLE[x as usize]
+}
@@ -0,0 +1,9 @@
+pub mod hex;
+fn main() {
+ println!("Hello: {}", hex::get_hex(12));