(path: &Path)
| 1114 | |
| 1115 | impl FileContent { |
| 1116 | fn read(path: &Path) -> Result<Self, DynError> { |
| 1117 | let content = fs::read_to_string(path)?; |
| 1118 | let lines = content.lines().map(str::to_string).collect(); |
| 1119 | Ok(Self { |
| 1120 | path: normalize_path(&path_to_string(path)), |
| 1121 | content, |
| 1122 | lines, |
| 1123 | }) |
| 1124 | } |
| 1125 | } |
| 1126 | |
| 1127 | #[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)] |
no test coverage detected