to_ref 0.1.1

let path = url.to_ref::<Path>();
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 1.46 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 994.75 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • iduanyingjie/to_ref
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • iduanyingjie

Before:

let url = "www.google.com".to_string();
let path: &Path = url.as_ref();

Now:

let url = "www.google.com".to_string();
let path = url.to_ref::<Path>();