rust/hedgewars-server/src/handlers.rs
changeset 15439 a158ff8f84ef
parent 15216 387345a14b3f
child 15441 61a0bd0bb021
equal deleted inserted replaced
15438:e7c059ac6e54 15439:a158ff8f84ef
    30 mod checker;
    30 mod checker;
    31 mod common;
    31 mod common;
    32 mod inanteroom;
    32 mod inanteroom;
    33 mod inlobby;
    33 mod inlobby;
    34 mod inroom;
    34 mod inroom;
       
    35 mod strings;
    35 
    36 
    36 #[derive(PartialEq, Debug)]
    37 #[derive(PartialEq, Debug)]
    37 pub struct Sha1Digest([u8; 20]);
    38 pub struct Sha1Digest([u8; 20]);
    38 
    39 
    39 impl Sha1Digest {
    40 impl Sha1Digest {
   155     }
   156     }
   156 
   157 
   157     #[inline]
   158     #[inline]
   158     pub fn add(&mut self, message: PendingMessage) {
   159     pub fn add(&mut self, message: PendingMessage) {
   159         self.messages.push(message)
   160         self.messages.push(message)
       
   161     }
       
   162 
       
   163     #[inline]
       
   164     pub fn warn(&mut self, message: &str) {
       
   165         self.add(Warning(message.to_string()).send_self());
   160     }
   166     }
   161 
   167 
   162     #[inline]
   168     #[inline]
   163     pub fn request_io(&mut self, task: IoTask) {
   169     pub fn request_io(&mut self, task: IoTask) {
   164         self.io_tasks.push(task)
   170         self.io_tasks.push(task)