use typed_fields::path;
path!(
Marker
);
impl From<std::path::PathBuf> for Marker {
fn from(path: std::path::PathBuf) -> Self {
Self::new(path)
}
}
#[cfg(test)]
mod tests {
#![allow(clippy::missing_panics_doc)]
use super::*;
#[test]
fn from_path_buf_keeps_the_path() {
let marker = Marker::from(std::path::PathBuf::from(".git"));
assert_eq!(marker.get(), std::path::Path::new(".git"));
}
}