MCPcopy Create free account
hub / github.com/FastLED/FastLED / read

Method read

ci/lint_cpp_rs/src/lib.rs:1116–1124  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

1114
1115impl 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)]

Callers 4

is_bracket_balancedFunction · 0.45
mainFunction · 0.45

Calls 3

path_to_stringFunction · 0.85
normalize_pathFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected