diff options
Diffstat (limited to 'crates/common/tedge_config/src/models/file_path.rs')
-rw-r--r-- | crates/common/tedge_config/src/models/file_path.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/common/tedge_config/src/models/file_path.rs b/crates/common/tedge_config/src/models/file_path.rs index 62ef5723..7b80c972 100644 --- a/crates/common/tedge_config/src/models/file_path.rs +++ b/crates/common/tedge_config/src/models/file_path.rs @@ -45,8 +45,12 @@ impl std::fmt::Display for FilePath { } } +// If we `impl From<FilePath> for PathBuf` as suggested by clippy, +// Then we can no more have a generic implementation +// `impl<T> From<T> for FilePath where PathBuf: From<T>` +#[allow(clippy::from_over_into)] impl Into<PathBuf> for FilePath { fn into(self) -> PathBuf { - PathBuf::from(self.0) + self.0 } } |