From 50e6a82f0955bf5d489d311f2c9600c379006c37 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Thu, 29 Aug 2019 21:23:58 +0200 Subject: Use dyn keyword for trait objects to fix deprecation warnings --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 64291cb..6250722 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -163,7 +163,7 @@ impl Tftp { /// This function will always fill the buffer completely (like expected from /// read_exact), but also works with EOF, by filling the buffer partially and /// returning the amount of bytes read. - fn read_exact(&self, reader: &mut Read, buf: &mut [u8]) -> Result { + fn read_exact(&self, reader: &mut dyn Read, buf: &mut [u8]) -> Result { let maxlen = buf.len(); let mut outbuf = Vec::with_capacity(maxlen); let mut len = 0; -- cgit v1.2.3