Skip to content

Commit 3fcd154

Browse files
committed
fix: made trait comments get ignored on test
1 parent d20af91 commit 3fcd154

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

crates/base/src/traits.rs

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ use tucana::shared::ValidationFlow;
1515
///
1616
/// # Example
1717
///
18-
/// ```rust
18+
/// ```ignore
19+
/// use base::traits::LoadConfig;
20+
///
1921
/// #[derive(Clone)]
2022
/// struct MyConfig {
2123
/// port: u16,
@@ -67,7 +69,20 @@ pub trait LoadConfig: Sized + Clone + Send + Sync + 'static {
6769
///
6870
/// # Example
6971
///
70-
/// ```rust
72+
/// ```ignore
73+
/// use async_trait::async_trait;
74+
/// use base::runner::ServerContext;
75+
/// use base::traits::{LoadConfig, Server};
76+
///
77+
/// #[derive(Clone)]
78+
/// struct MyConfig;
79+
///
80+
/// impl LoadConfig for MyConfig {
81+
/// fn load() -> Self {
82+
/// todo!()
83+
/// }
84+
/// }
85+
///
7186
/// struct MyServer {
7287
/// // Server state fields
7388
/// }
@@ -201,9 +216,27 @@ pub trait IdentifiableFlow {
201216
///
202217
/// # Examples
203218
///
204-
/// ```rust
219+
/// ```ignore
220+
/// use tucana::shared::ValidationFlow;
221+
///
222+
/// use base::traits::IdentifiableFlow;
223+
///
224+
/// struct MyFlowMatcher;
225+
///
226+
/// impl MyFlowMatcher {
227+
/// fn new() -> Self {
228+
/// MyFlowMatcher {}
229+
/// }
230+
/// }
231+
///
232+
/// impl IdentifiableFlow for MyFlowMatcher {
233+
/// fn identify(&self, flow: &ValidationFlow) -> bool {
234+
/// todo!()
235+
/// }
236+
/// }
237+
///
205238
/// let matcher = MyFlowMatcher::new();
206-
/// let flow = ValidationFlow { /* ... */ };
239+
/// let flow = ValidationFlow::default();
207240
///
208241
/// if matcher.identify(&flow) {
209242
/// // Handle this specific type of flow

0 commit comments

Comments
 (0)