Avatar

Leo Uino

lwhjp@lemmy.sdf.org
Joined
2 posts • 3 comments
Direct message

Oh, that’s fun! (And looks like an easy way to lose track of a few hours as well…)

permalink
report
reply

I’m not fluent in Rust, but is this something like the C++ placement new? Presumably just declaring a table of Vecs won’t automatically call the default constructor? (Sorry for my total ignorance – pointers to appropriate reading material appreciated)

permalink
report
parent
reply

TDD

const max12 = (x, y) => {
    if (x === 1 && y === 2) {
        return 2;
    } else if (x === 7 && y === 4) {
        return 7;
    } else {
        return x;
    }
};
permalink
report
reply