mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
Remove unused variable _stopper
This commit is contained in:
parent
ea5df90869
commit
2fc8d39940
@ -22,17 +22,14 @@ async fn main() -> std::io::Result<()> {
|
||||
|
||||
// create a channel
|
||||
let (tx, rx) = mpsc::channel::<()>();
|
||||
let _stopper = tx.clone();
|
||||
|
||||
let bind = "127.0.0.1:8080";
|
||||
|
||||
// start server as normal but don't .await after .run() yet
|
||||
let server = HttpServer::new(move || {
|
||||
// give the server a Sender in .data
|
||||
let stopper = tx.clone();
|
||||
|
||||
App::new()
|
||||
.data(stopper)
|
||||
.data(tx.clone())
|
||||
.wrap(middleware::Logger::default())
|
||||
.service(hello)
|
||||
.service(stop)
|
||||
|
Loading…
Reference in New Issue
Block a user