about summary refs log tree commit diff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ad0ead59e53a..2ae22f162893 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -185,7 +185,7 @@ impl Queue {
         Ok(())
     }
 
-    pub fn send(self, msg: Message) -> Result<(), Error> {
+    pub fn send(&self, msg: Message) -> Result<(), Error> {
         if msg.data.len() > self.max_size as usize {
             return Err(Error::MessageSizeExceeded());
         }
@@ -197,7 +197,7 @@ impl Queue {
         ).map_err(|e| e.into())
     }
 
-    pub fn receive(self) -> Result<Message, Error> {
+    pub fn receive(&self) -> Result<Message, Error> {
         let mut data: Vec<u8> = vec![0; self.max_size as usize];
         let mut priority: u32 = 0;