Skip to content

Commit

Permalink
example: Use updated coap-handler idiom
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Feb 11, 2021
1 parent a14a0ea commit 4a5ab5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/server_coaphandler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};

use coap_handler::implementations::{
HandlerBuilder, SimpleCBORHandler, SimpleCBORWrapper, SimpleRenderable,
TypedStaticResponse,
SimpleRendered, TypedStaticResponse,
};
use coap_handler::Handler as _;

Expand Down Expand Up @@ -44,8 +44,8 @@ fn main() {
contentformat: &[40],
},
)
.at(&[], "Welcome to the Demo server")
.at(&["time"], Time)
.at(&[], SimpleRendered("Welcome to the Demo server"))
.at(&["time"], SimpleRendered(Time))
.at(&["cbor"], SimpleCBORWrapper::new(&mut value_at_cbor));

let socket = UdpSocket::bind("127.0.0.1:5683").unwrap();
Expand Down

0 comments on commit 4a5ab5f

Please sign in to comment.