From 2a08434062e260bd9a2f9559848c9d38becf67fc Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Wed, 27 Oct 2021 20:06:30 +1100 Subject: [PATCH] Silence deprecation warning for Windows (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `trim_right` is deprecated in favor of `trim_end`, but the latter requires Rust ≥ 1.30. --- src/windows.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/windows.rs b/src/windows.rs index c1595e9b..49942871 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -45,6 +45,7 @@ pub fn with_description(err: Errno, callback: F) -> T where let msg = String::from_utf16_lossy(&buf[..res as usize]); // Trim trailing CRLF inserted by FormatMessageW + #[allow(deprecated)] // TODO: remove when MSRV >= 1.30 callback(Ok(msg.trim_right())) } }