X-Git-Url: http://git.euphorik.ch/?p=crypto_lab1.git;a=blobdiff_plain;f=lab1_rust%2Fsrc%2Fpacket.rs;fp=lab1_rust%2Fsrc%2Fpacket.rs;h=ec63d9e0e1614f355d8fdabb43d6e1b30cf5b80f;hp=ff6aa716f88117c8fc4ac54b3d626ec3bf6a7fc0;hb=a8641e8dd205140af9206e82169ff5ad107c23f8;hpb=63bf602df7a7a6e584c1479c1496e12a96fabcd0 diff --git a/lab1_rust/src/packet.rs b/lab1_rust/src/packet.rs index ff6aa71..ec63d9e 100644 --- a/lab1_rust/src/packet.rs +++ b/lab1_rust/src/packet.rs @@ -29,7 +29,7 @@ pub enum ReadingError { // A macro to return a 'Err(ReadingError::IO(..))' in case of error. macro_rules! try_read_io( ($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(ReadingError::IO(e)) }) -) +); // There are all the errors that may occur when encrypting, authenticating and writing a packet. #[deriving(Show)] @@ -41,7 +41,7 @@ pub enum WritingError { // A macro to return a 'Err(WritingError::IO(..))' in case of error. macro_rules! try_write_io( ($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(WritingError::IO(e)) }) -) +); pub type ReadingResult = Result; pub type WritingResult = Result<(), WritingError>;