mirror of
https://github.com/openai/codex.git
synced 2026-06-01 19:02:59 +00:00
[codex] Make AbsolutePathBuf joins infallible (#16981)
Having to check for errors every time join is called is painful and unnecessary.
This commit is contained in:
@@ -35,16 +35,7 @@ pub(crate) fn discover_handlers(config_layer_stack: Option<&ConfigLayerStack>) -
|
||||
let Some(folder) = layer.config_folder() else {
|
||||
continue;
|
||||
};
|
||||
let source_path = match folder.join("hooks.json") {
|
||||
Ok(source_path) => source_path,
|
||||
Err(err) => {
|
||||
warnings.push(format!(
|
||||
"failed to resolve hooks config path from {}: {err}",
|
||||
folder.display()
|
||||
));
|
||||
continue;
|
||||
}
|
||||
};
|
||||
let source_path = folder.join("hooks.json");
|
||||
if !source_path.as_path().is_file() {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user