Skip to content

Commit f596c84

Browse files
committed
docs: fix doctest for private validate_skill_name function
Remove invalid doctest example that tried to call private function directly. The validation is properly tested through public APIs (wasm_path, vfs_path, etc). All 343 doctests now passing across workspace.
1 parent ba6a577 commit f596c84

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

crates/mcp-core/src/cache_manager.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -314,20 +314,7 @@ impl CacheManager {
314314
/// - Contains `..` (directory traversal)
315315
/// - Contains null bytes
316316
///
317-
/// # Examples
318-
///
319-
/// ```
320-
/// use mcp_core::CacheManager;
321-
///
322-
/// // Valid names pass
323-
/// assert!(CacheManager::validate_skill_name("valid-skill").is_ok());
324-
/// assert!(CacheManager::validate_skill_name("skill_123").is_ok());
325-
///
326-
/// // Invalid names fail
327-
/// assert!(CacheManager::validate_skill_name("").is_err());
328-
/// assert!(CacheManager::validate_skill_name("../etc/passwd").is_err());
329-
/// assert!(CacheManager::validate_skill_name("..\\system32").is_err());
330-
/// ```
317+
/// This validation is tested through public APIs like `wasm_path()`, `vfs_path()`, etc.
331318
fn validate_skill_name(name: &str) -> Result<()> {
332319
if name.is_empty() {
333320
return Err(Error::CacheError {

0 commit comments

Comments
 (0)