Skip to content

Commit

Permalink
fix: docs commit;
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr.Panda committed May 11, 2023
1 parent adb6515 commit a38a2a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion turn-server/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async fn fork_socket(
/// let config = Config::new()
/// let service = Service::new(/* ... */);;
///
/// // run(&service, config ).await?
/// // run(&service, config).await?
/// ```
pub async fn run(
service: &Service,
Expand Down
17 changes: 4 additions & 13 deletions turn/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,8 @@ impl Service {
/// }
///
/// let _service = Service::new(
/// Options {
/// external: "127.0.0.1:4378".parse().unwrap(),
/// realm: "test".to_string(),
/// },
/// Events {},
/// "test".to_string(),
/// );
/// ```
pub fn new<T>(observer: T, realm: String) -> Self
Expand Down Expand Up @@ -256,11 +253,8 @@ impl Service {
/// }
///
/// let service = Service::new(
/// Options {
/// external: "127.0.0.1:4378".parse().unwrap(),
/// realm: "test".to_string(),
/// },
/// Events {},
/// "test".to_string(),
/// );
///
/// tokio::spawn(service.run()).await;
Expand All @@ -283,17 +277,14 @@ impl Service {
/// }
///
/// let service = Service::new(
/// Options {
/// external: "127.0.0.1:4378".parse().unwrap(),
/// realm: "test".to_string(),
/// },
/// Events {},
/// "test".to_string(),
/// );
///
/// tokio::spawn(service.run());
///
/// let socket = UdpSocket::bind("127.0.0.1:34254")?;
/// let mut processor = service.get_processor();
/// let mut processor = service.get_processor("127.0.0.1:34254".into()?);
///
/// let mut buf = [0; 4096];
/// let (amt, src) = socket.recv_from(&mut buf).unwrap();
Expand Down
5 changes: 1 addition & 4 deletions turn/src/router/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ impl Router {
/// }
///
/// let _router = Router::new(
/// Arc::new(Options {
/// external: "127.0.0.1:4378".parse().unwrap(),
/// realm: "test".to_string(),
/// }),
/// "test".to_string(),
/// Arc::new(Events {}),
/// );
/// ```
Expand Down

0 comments on commit a38a2a8

Please sign in to comment.