nandi/rustnimpublic Fork 0
8354895601e0a0fa3e1962b9ef728d00050ffb97
Commits
Clone
git clone https://git.rickub.com/nandi/rustnim.git
git clone ssh://git@rickub.com/nandi/rustnim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Add the differential test runner, and a lowering to measure with it 8ac32af · on 8354895601e0a0fa3e1962b9ef728d00050ffb97 · nandithebull · 8h ago
014-chars.rs · 10 lines · 348 BRust Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
// DESIGN.md open question 4: Rust `char` is a Unicode scalar, mapped to Nim's
// `Rune`. This checks the round trip, including a non-ASCII scalar.
fn main() {
    let a: char = 'a';
    let z: char = 'ζ';
    println!("{} {}", a, z);
    println!("{:?} {:?}", a, z);
    println!("{} {}", a as u32, z as u32);
    println!("{}", 955u32 as u8);
}