From b195208ddc57366a24f412a8cfa6ffb8e54ba49d Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Sat, 30 Aug 2025 12:18:30 -0400 Subject: [PATCH] Fix doctest compilation errors in config.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix doctest import paths to use calendar_backend::config::CalDAVConfig - Add proper Result handling in doctest example with ?operator - All doctests now passing (3/3) - Complete test coverage: 7 unit + 9 integration + 3 doc = 19 tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- backend/src/config.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/src/config.rs b/backend/src/config.rs index 2827bd8..7392bed 100644 --- a/backend/src/config.rs +++ b/backend/src/config.rs @@ -16,13 +16,15 @@ use base64::prelude::*; /// # Example /// /// ```rust -/// use crate::config::CalDAVConfig; -/// +/// # use calendar_backend::config::CalDAVConfig; +/// # fn example() -> Result<(), Box> { /// // Load configuration from environment variables /// let config = CalDAVConfig::from_env()?; /// /// // Use the configuration for HTTP requests /// let auth_header = format!("Basic {}", config.get_basic_auth()); +/// # Ok(()) +/// # } /// ``` #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CalDAVConfig { @@ -72,7 +74,7 @@ impl CalDAVConfig { /// # Example /// /// ```rust - /// use crate::config::CalDAVConfig; + /// # use calendar_backend::config::CalDAVConfig; /// /// match CalDAVConfig::from_env() { /// Ok(config) => { @@ -123,7 +125,7 @@ impl CalDAVConfig { /// # Example /// /// ```rust - /// use crate::config::CalDAVConfig; + /// # use calendar_backend::config::CalDAVConfig; /// /// let config = CalDAVConfig { /// server_url: "https://example.com".to_string(),