#path #ref #url #now

to_ref

let path = url.to_ref::<Path>();

2 releases

0.1.1 Feb 22, 2021
0.1.0 Feb 22, 2021

#28 in #ref

MIT license

2KB

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>();

No runtime deps