Skip to content

Commit f522308

Browse files
committed
docs: real solutions
1 parent 12d658a commit f522308

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/hardlink/deduplicate.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
use crate::{data_tree::DataTree, os_string_display::OsStringDisplay, size};
22

33
// TODO:
4-
// Consider changing `deduplicate` into taking owned `DataTree` and returning `Result<(DataTree, Self::Report), Self::Error>`.
5-
6-
// TODO:
7-
// Consider changing `deduplicate` into one that transforms `HardlinkDuplicated<DataTree>` into `DataTree`.
8-
// `HardlinkDuplicated` (name is non-final) cannot be constructed manually and is the only type accepted by `deduplicate`.
4+
// Problem: It is possible for the users to call deduplicate twice on 1 data tree, which is unsound.
5+
// Potential solution #1: Consider adding the data tree to the deduplication record as hidden field until it is processed.
6+
// Potential solution #2: Perhaps the deduplication should be done in FsTreeBuilder itself.
97

108
/// Ability to correct the sizes in a [`DataTree`] by reducing the size of recorded shared links.
119
///

0 commit comments

Comments
 (0)