Skip to content

Instantly share code, notes, and snippets.

@shivshank
shivshank / playground.rs
Created September 3, 2017 00:04 — forked from anonymous/playground.rs
Rust code shared from the playground
fn main() {
use shape_args::Dot;
draw(Dot(5.5));
}
// I need a function that works like this:
// pub fn draw<D: Drawable, T: Into<D>>(d: T) {
// but where Rust can always infer what D is
pub fn draw<T: DrawableArg>(d: T) {