From 0457fe4d616017a0ae4cb93d5218d765a5d1a954 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 2 Jun 2018 09:19:13 -0700 Subject: [PATCH] add System changes to migration guide --- MIGRATION.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/MIGRATION.md b/MIGRATION.md index 6436593ef..3855f025e 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,5 +1,28 @@ ## 0.7 +* `actix::System` has new api. + + Instead of + + ```run + fn main() { + let sys = actix::System::new(..); + + HttpServer::new(|| ...).start() + sys.run(); + } + ``` + + Server must be initialized within system run closure: + + ```run + fn main() { + actix::System::run(|| { + HttpServer::new(|| ...).start() + }); + } + ``` + * Middleware trait uses `&mut self` instead of `&self`. * Removed `Route::with2()` and `Route::with3()` use tuple of extractors instead.