# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] edition = "2018" name = "upcast" version = "0.1.0" authors = ["Connie Hilarides "] description = "Simple trait for helping along upcasting of dyn supertraits.\n\n```\npub trait A {}\npub trait B: A + Upcast {}\n\n// Put this in your library\nimpl<'a, T: A + 'a> UpcastFrom for dyn A + 'a {\n fn up_from(value: &T) -> &(dyn A + 'a) { value }\n fn up_from_mut(value: &mut T) -> &mut (dyn A + 'a) { value }\n}\n\n// Now your users can do an upcast if needed, or you can within implementations\nfn do_cast(b: &dyn B) -> &dyn A {\n b.up()\n}\n```\n" keywords = ["upcast", "supertraits"] license = "MIT" repository = "https://github.com/connicpu/upcast"