From 4fd6f95f4fb39ababd14afaaf3ba41e0d413ef34 Mon Sep 17 00:00:00 2001 From: piegames Date: Wed, 17 Nov 2021 18:18:53 +0100 Subject: [PATCH] fixup! Add Log implementation on foreign types Removes the Pin implementation again, because of the MSRV of the crate beeing too low --- src/lib.rs | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5dfb914..1dbae3b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1283,24 +1283,6 @@ where } } -#[cfg(feature = "std")] -impl Log for std::pin::Pin

-where - P: std::ops::Deref + std::marker::Send + std::marker::Sync, - T: Log + ?Sized, -{ - fn enabled(&self, metadata: &Metadata) -> bool { - (**self).enabled(metadata) - } - - fn log(&self, record: &Record) { - (**self).log(record) - } - fn flush(&self) { - (**self).flush() - } -} - #[cfg(feature = "std")] impl Log for std::sync::Arc where @@ -1900,7 +1882,7 @@ mod tests { fn test_foreign_impl() { use super::Log; #[cfg(feature = "std")] - use std::{pin::Pin, sync::Arc}; + use std::sync::Arc; fn assert_is_log() {} @@ -1909,9 +1891,6 @@ mod tests { #[cfg(feature = "std")] assert_is_log::>(); - #[cfg(feature = "std")] - assert_is_log::>>(); - #[cfg(feature = "std")] assert_is_log::>(); @@ -1921,9 +1900,6 @@ mod tests { #[cfg(feature = "std")] assert_is_log::>(); - #[cfg(feature = "std")] - assert_is_log::>>(); - assert_is_log::<&T>(); #[cfg(feature = "std")]