MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / with_suggestions

Method with_suggestions

crates/opencode-tool/src/tool.rs:737–748  ·  view source on GitHub ↗
(msg: impl Into<String>, suggestions: &[String])

Source from the content-addressed store, hash-verified

735
736impl ToolError {
737 pub fn with_suggestions(msg: impl Into<String>, suggestions: &[String]) -> Self {
738 let msg = msg.into();
739 if suggestions.is_empty() {
740 ToolError::FileNotFound(msg)
741 } else {
742 ToolError::FileNotFound(format!(
743 "{}\n\nDid you mean one of these?\n{}",
744 msg,
745 suggestions.join("\n")
746 ))
747 }
748 }
749}

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected