fn warn_about_missing_hardlinks(&self) {
		let mut links_found = HashMap::new();

		for file in &self.files {
			if let Some(hardlink_id) = file.file.hardlink_id {
				*links_found.entry(hardlink_id).or_insert(0) += 1;
			}
		}

		for hardlink in self.hardlink_map.values() {
			match links_found.get(&hardlink.id) {
				Some(links) => {
					if links < &hardlink.expected_links {
						warn!("A hardlink with {} links was included in this backup, but only {} of those links have been included.  One of the links: '{}'", hardlink.expected_links, links, hardlink.example_path.display());
					}
				},
				None => {
					warn!("A hardlink with {} links was supposed to be included in this backup, but none of those links have been included.  One of the links: '{}'", hardlink.expected_links, hardlink.example_path.display());
				}
			}
		}
	}
/// Logs warnings about any hardlinks for which we haven't backed up all the links.
Logs warnings about any hardlinks for which we haven't backed up all the links.
Logs warnings about any hardlinks for which we haven ' t backed up all the links .
fn warn_about_missing_hardlinks(&self) {
		let mut links_found = HashMap::new();
		for file in &self.files {
			if let Some(hardlink_id) = file.file.hardlink_id {
				*links_found.entry(hardlink_id).or_insert(0) += 1;
			}
		}
		for hardlink in self.hardlink_map.values() {
			match links_found.get(&hardlink.id) {
				Some(links) => {
					if links < &hardlink.expected_links {
						warn!("A hardlink with {} links was included in this backup, but only {} of those links have been included.  One of the links: '{}'", hardlink.expected_links, links, hardlink.example_path.display());
					}
				},
				None => {
					warn!("A hardlink with {} links was supposed to be included in this backup, but none of those links have been included.  One of the links: '{}'", hardlink.expected_links, hardlink.example_path.display());
				}
			}
		}
	}
fn warn_about_missing_hardlinks ( & self ) { let mut links_found = HashMap :: new ( ) ; for file in & self . files { if let Some ( hardlink_id ) = file . file . hardlink_id { * links_found . entry ( hardlink_id ) . or_insert ( 0 ) += 1 ; } } for hardlink in self . hardlink_map . values ( ) { match links_found . get ( & hardlink . id ) { Some ( links ) => { if links < & hardlink . expected_links { warn ! ( " " hardlink expected_links links hardlink example_path display ( ) ) ; } } , None => { warn ! ( " " hardlink expected_links hardlink example_path display ( ) ) ; } } } }
Logs warnings about any hardlinks for which we haven't backed up all the links.
Logs warnings about any hardlinks for which we haven ' t backed up all the links .
&self
&self