11use std:: {
2- any, borrow:: { Borrow , BorrowMut } , boxed, error, fmt, marker, ops:: { self , Deref , DerefMut } , rc, sync
2+ any, borrow:: { Borrow , BorrowMut } , boxed, error, fmt, marker, marker :: Tuple , ops:: { self , Deref , DerefMut } , rc, sync
33} ;
44
55use super :: { deserialize, serialize, Deserialize , Serialize } ;
@@ -91,22 +91,22 @@ impl<T: ?Sized> AsMut<boxed::Box<T>> for Box<T> {
9191}
9292impl < T : ?Sized > AsRef < T > for Box < T > {
9393 fn as_ref ( & self ) -> & T {
94- & * self . 0
94+ & self . 0
9595 }
9696}
9797impl < T : ?Sized > AsMut < T > for Box < T > {
9898 fn as_mut ( & mut self ) -> & mut T {
99- & mut * self . 0
99+ & mut self . 0
100100 }
101101}
102102impl < T : ?Sized > Borrow < T > for Box < T > {
103103 fn borrow ( & self ) -> & T {
104- & * self . 0
104+ & self . 0
105105 }
106106}
107107impl < T : ?Sized > BorrowMut < T > for Box < T > {
108108 fn borrow_mut ( & mut self ) -> & mut T {
109- & mut * self . 0
109+ & mut self . 0
110110 }
111111}
112112impl < T : ?Sized > From < boxed:: Box < T > > for Box < T > {
@@ -147,7 +147,7 @@ impl<T: fmt::Display + ?Sized> fmt::Display for Box<T> {
147147 self . 0 . fmt ( f)
148148 }
149149}
150- impl < A , F : ?Sized > ops:: FnOnce < A > for Box < F >
150+ impl < A : Tuple , F : ?Sized > ops:: FnOnce < A > for Box < F >
151151where
152152 F : FnOnce < A > ,
153153{
@@ -156,15 +156,15 @@ where
156156 self . 0 . call_once ( args)
157157 }
158158}
159- impl < A , F : ?Sized > ops:: FnMut < A > for Box < F >
159+ impl < A : Tuple , F : ?Sized > ops:: FnMut < A > for Box < F >
160160where
161161 F : FnMut < A > ,
162162{
163163 extern "rust-call" fn call_mut ( & mut self , args : A ) -> Self :: Output {
164164 self . 0 . call_mut ( args)
165165 }
166166}
167- impl < A , F : ?Sized > ops:: Fn < A > for Box < F >
167+ impl < A : Tuple , F : ?Sized > ops:: Fn < A > for Box < F >
168168where
169169 F : Fn < A > ,
170170{
@@ -222,22 +222,22 @@ impl<T: ?Sized> AsMut<rc::Rc<T>> for Rc<T> {
222222}
223223impl < T : ?Sized > AsRef < T > for Rc < T > {
224224 fn as_ref ( & self ) -> & T {
225- & * self . 0
225+ & self . 0
226226 }
227227}
228228impl < T : ?Sized > Borrow < T > for Rc < T > {
229229 fn borrow ( & self ) -> & T {
230- & * self . 0
230+ & self . 0
231231 }
232232}
233233impl < T : ?Sized > From < rc:: Rc < T > > for Rc < T > {
234234 fn from ( t : rc:: Rc < T > ) -> Self {
235235 Self ( t)
236236 }
237237}
238- impl < T : ?Sized > Into < rc :: Rc < T > > for Rc < T > {
239- fn into ( self ) -> rc :: Rc < T > {
240- self . 0
238+ impl < T : ?Sized > From < Rc < T > > for rc :: Rc < T > {
239+ fn from ( v : Rc < T > ) -> Self {
240+ v . 0
241241 }
242242}
243243impl < T > From < T > for Rc < T > {
@@ -310,22 +310,22 @@ impl<T: ?Sized> AsMut<sync::Arc<T>> for Arc<T> {
310310}
311311impl < T : ?Sized > AsRef < T > for Arc < T > {
312312 fn as_ref ( & self ) -> & T {
313- & * self . 0
313+ & self . 0
314314 }
315315}
316316impl < T : ?Sized > Borrow < T > for Arc < T > {
317317 fn borrow ( & self ) -> & T {
318- & * self . 0
318+ & self . 0
319319 }
320320}
321321impl < T : ?Sized > From < sync:: Arc < T > > for Arc < T > {
322322 fn from ( t : sync:: Arc < T > ) -> Self {
323323 Self ( t)
324324 }
325325}
326- impl < T : ?Sized > Into < sync :: Arc < T > > for Arc < T > {
327- fn into ( self ) -> sync :: Arc < T > {
328- self . 0
326+ impl < T : ?Sized > From < Arc < T > > for sync :: Arc < T > {
327+ fn from ( v : Arc < T > ) -> Self {
328+ v . 0
329329 }
330330}
331331impl < T > From < T > for Arc < T > {
@@ -686,8 +686,8 @@ impl<'de> serde::de::Deserialize<'de> for boxed::Box<dyn Debug + Send + 'static>
686686/// A convenience trait implemented on all (de)serializable implementors of [`std::ops::FnOnce`].
687687///
688688/// It can be made into a trait object which is then (de)serializable.
689- pub trait FnOnce < Args > : ops:: FnOnce < Args > + Serialize + Deserialize { }
690- impl < T : ?Sized , Args > FnOnce < Args > for T where T : ops:: FnOnce < Args > + Serialize + Deserialize { }
689+ pub trait FnOnce < Args : Tuple > : ops:: FnOnce < Args > + Serialize + Deserialize { }
690+ impl < T : ?Sized , Args : Tuple > FnOnce < Args > for T where T : ops:: FnOnce < Args > + Serialize + Deserialize { }
691691
692692impl < ' a , Args , Output > AsRef < Self > for dyn FnOnce < Args , Output = Output > + ' a {
693693 fn as_ref ( & self ) -> & Self {
@@ -743,8 +743,8 @@ impl<'de, Args: 'static, Output: 'static> serde::de::Deserialize<'de>
743743/// A convenience trait implemented on all (de)serializable implementors of [`std::ops::FnMut`].
744744///
745745/// It can be made into a trait object which is then (de)serializable.
746- pub trait FnMut < Args > : ops:: FnMut < Args > + Serialize + Deserialize { }
747- impl < T : ?Sized , Args > FnMut < Args > for T where T : ops:: FnMut < Args > + Serialize + Deserialize { }
746+ pub trait FnMut < Args : Tuple > : ops:: FnMut < Args > + Serialize + Deserialize { }
747+ impl < T : ?Sized , Args : Tuple > FnMut < Args > for T where T : ops:: FnMut < Args > + Serialize + Deserialize { }
748748
749749impl < ' a , Args , Output > AsRef < Self > for dyn FnMut < Args , Output = Output > + ' a {
750750 fn as_ref ( & self ) -> & Self {
@@ -800,8 +800,8 @@ impl<'de, Args: 'static, Output: 'static> serde::de::Deserialize<'de>
800800/// A convenience trait implemented on all (de)serializable implementors of [`std::ops::Fn`].
801801///
802802/// It can be made into a trait object which is then (de)serializable.
803- pub trait Fn < Args > : ops:: Fn < Args > + Serialize + Deserialize { }
804- impl < T : ?Sized , Args > Fn < Args > for T where T : ops:: Fn < Args > + Serialize + Deserialize { }
803+ pub trait Fn < Args : Tuple > : ops:: Fn < Args > + Serialize + Deserialize { }
804+ impl < T : ?Sized , Args : Tuple > Fn < Args > for T where T : ops:: Fn < Args > + Serialize + Deserialize { }
805805
806806impl < ' a , Args , Output > AsRef < Self > for dyn Fn < Args , Output = Output > + ' a {
807807 fn as_ref ( & self ) -> & Self {
0 commit comments