ifaddrs: read_attr closure returns Option, so .ok() the read_file Result
The read_attr closure is typed -> Option<Vec<u8>> and its callers use `if let Some(...)`, but it returned read_file(...) directly, which is Result<Vec<u8>, ()> — E0308. Map it with .ok() (Ok->Some, Err(())->None). Fixes the relibc compile error that failed the prefix rebuild. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -381,7 +381,7 @@ fn enumerate_interfaces_redox() -> Result<Vec<InterfaceInfo>, ()> {
|
||||
}
|
||||
path_buf[path_len..path_len + suffix.len()].copy_from_slice(suffix);
|
||||
path_buf[path_len + suffix.len()] = 0;
|
||||
read_file(&path_buf[..need])
|
||||
read_file(&path_buf[..need]).ok()
|
||||
};
|
||||
|
||||
if let Some(flags_bytes) = read_attr(b"flags") {
|
||||
|
||||
Reference in New Issue
Block a user