Skip to content

Commit b8aef83

Browse files
committed
Fix rustdoc test for Service
1 parent c72c7c2 commit b8aef83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/service/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ impl<'a> From<ServiceRunnable<'a>> for ServiceRunnableOwned {
184184
/// You can also use action maps to assist with cross-platform compatibility:
185185
///
186186
/// ```no_run
187+
/// # #[macro_use] extern crate inapi;
188+
/// # fn main() {
187189
/// # use inapi::{Host, Service, ServiceRunnable};
188190
/// # use std::collections::HashMap;
189191
#[cfg_attr(feature = "local-run", doc = "# let path: Option<String> = None;")]
@@ -195,6 +197,7 @@ impl<'a> From<ServiceRunnable<'a>> for ServiceRunnableOwned {
195197
///}
196198
///let service = Service::new_service(ServiceRunnable::Command("/usr/bin/my_svc"), Some(map));
197199
///service.action(&mut host, "reload").unwrap(); // <-- Calls "/usr/bin/my_svc restart" on CentOS
200+
/// # }
198201
/// ```
199202
pub struct Service {
200203
/// Actions map for Runnables

0 commit comments

Comments
 (0)