Credit the source of the `device_num()` function

This commit is contained in:
Simon Engmann 2019-12-30 23:09:46 +01:00 committed by David Peter
parent cd2dc5714e
commit 9a34ba6a0c
1 changed files with 1 additions and 0 deletions

View File

@ -563,6 +563,7 @@ fn test_follow() {
#[cfg(unix)]
fn test_file_system_boundaries() {
// Helper function to get the device ID for a given path
// Inspired by https://github.com/BurntSushi/ripgrep/blob/8892bf648cfec111e6e7ddd9f30e932b0371db68/ignore/src/walk.rs#L1693
fn device_num(path: impl AsRef<Path>) -> u64 {
use std::os::unix::fs::MetadataExt;