This crate provide an extension trait for [OpenOptions
] to avoid dereferencing if the given
path is a symbolic link when opening a file.
use nofollow::OpenOptionsExt;
use std::fs::OpenOptions;
OpenOptions::new().read(true).no_follow().open(env!("CARGO")).unwrap();