upgraded usage of deprecated API so project compiles

After I cloned the project and tried to build it, I got many compilation errors in referenced libraries.
``cargo update`` fixed them, but a few errors appeared in server.rs, due to using deprecated API.
**This pull request fixes only the latter problem.**

I wonder if we can make Cargo.lock contain specific revisions for ``dependencies`` of referenced packages, just as it has for ``packages``, so we don't have such problem in the first place.