This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |