refactor(link): remove TODO comment

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2023-10-17 07:02:45 +02:00
parent 1d72d44e04
commit fe7c932c69

View file

@ -198,7 +198,6 @@ impl Link {
let tx_path: &Path = std::path::Path::new(&self.tx); let tx_path: &Path = std::path::Path::new(&self.tx);
let rx_path: &Path = std::path::Path::new(&self.rx); let rx_path: &Path = std::path::Path::new(&self.rx);
match rx_path.try_exists() { match rx_path.try_exists() {
// TODO: unwrap defeats the purpose here.
Ok(true) => handle_file_exists(self, tx_path, rx_path), Ok(true) => handle_file_exists(self, tx_path, rx_path),
Ok(false) if rx_path.is_symlink() => Err(LinkError::FileExists( Ok(false) if rx_path.is_symlink() => Err(LinkError::FileExists(
tx_path.to_string_lossy().to_string(), tx_path.to_string_lossy().to_string(),