Update example.rs

Ported to rust 0.6. Use the new comm API.