Check channel to registered before
(&self, chan: &Sender<Msg>)
| 219 | |
| 220 | /// Check channel to registered before |
| 221 | fn check(&self, chan: &Sender<Msg>) -> Result<(), ()> { |
| 222 | for (_index, dst) in self.channels.iter().enumerate() { |
| 223 | |
| 224 | // if channel was same |
| 225 | if chan.same_channel(dst) { |
| 226 | return Err(()) |
| 227 | } |
| 228 | |
| 229 | } |
| 230 | Ok(()) |
| 231 | } |
| 232 | } |
| 233 | |
| 234 |