Add From<&str> for WatchedPath

This commit is contained in:
Félix Saparelli 2021-10-16 01:13:39 +13:00
parent 75243bfdad
commit 86882e8d27
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
1 changed files with 6 additions and 0 deletions

View File

@ -71,6 +71,12 @@ impl From<PathBuf> for WatchedPath {
}
}
impl From<&str> for WatchedPath {
fn from(path: &str) -> Self {
Self(path.into())
}
}
impl From<&Path> for WatchedPath {
fn from(path: &Path) -> Self {
Self(path.into())