@@ -541,13 +541,13 @@ pub trait Item: IntoAttributes + FromAttributes {
541
541
/// ```
542
542
pub trait Attribute : Sized {
543
543
/// Returns a conversion into an `AttributeValue`
544
- fn into_attr ( self : Self ) -> AttributeValue ;
544
+ fn into_attr ( self ) -> AttributeValue ;
545
545
/// Returns a fallible conversion from an `AttributeValue`
546
546
fn from_attr ( value : AttributeValue ) -> Result < Self , AttributeError > ;
547
547
}
548
548
549
549
impl Attribute for AttributeValue {
550
- fn into_attr ( self : Self ) -> AttributeValue {
550
+ fn into_attr ( self ) -> AttributeValue {
551
551
self
552
552
}
553
553
fn from_attr ( value : AttributeValue ) -> Result < Self , AttributeError > {
@@ -635,7 +635,7 @@ impl<A: Attribute> IntoAttributes for BTreeMap<String, A> {
635
635
636
636
/// A Map type for all hash-map-like values, represented as the `M` AttributeValue type
637
637
impl < T : IntoAttributes + FromAttributes > Attribute for T {
638
- fn into_attr ( self : Self ) -> AttributeValue {
638
+ fn into_attr ( self ) -> AttributeValue {
639
639
let mut map = HashMap :: new ( ) ;
640
640
self . into_attrs ( & mut map) ;
641
641
AttributeValue {
@@ -651,7 +651,7 @@ impl<T: IntoAttributes + FromAttributes> Attribute for T {
651
651
/// A `String` type for `Uuids`, represented by the `S` AttributeValue type
652
652
#[ cfg( feature = "uuid" ) ]
653
653
impl Attribute for Uuid {
654
- fn into_attr ( self : Self ) -> AttributeValue {
654
+ fn into_attr ( self ) -> AttributeValue {
655
655
AttributeValue {
656
656
s : Some ( self . to_hyphenated ( ) . to_string ( ) ) ,
657
657
..AttributeValue :: default ( )
@@ -668,7 +668,7 @@ impl Attribute for Uuid {
668
668
/// An `rfc3339` formatted version of `DateTime<Utc>`, represented by the `S` AttributeValue type
669
669
#[ cfg( feature = "chrono" ) ]
670
670
impl Attribute for DateTime < Utc > {
671
- fn into_attr ( self : Self ) -> AttributeValue {
671
+ fn into_attr ( self ) -> AttributeValue {
672
672
AttributeValue {
673
673
s : Some ( self . to_rfc3339 ( ) ) ,
674
674
..Default :: default ( )
@@ -690,7 +690,7 @@ impl Attribute for DateTime<Utc> {
690
690
/// An `rfc3339` formatted version of `DateTime<Local>`, represented by the `S` AttributeValue type
691
691
#[ cfg( feature = "chrono" ) ]
692
692
impl Attribute for DateTime < Local > {
693
- fn into_attr ( self : Self ) -> AttributeValue {
693
+ fn into_attr ( self ) -> AttributeValue {
694
694
AttributeValue {
695
695
s : Some ( self . to_rfc3339 ( ) ) ,
696
696
..Default :: default ( )
@@ -712,7 +712,7 @@ impl Attribute for DateTime<Local> {
712
712
/// An `rfc3339` formatted version of `DateTime<FixedOffset>`, represented by the `S` AttributeValue type
713
713
#[ cfg( feature = "chrono" ) ]
714
714
impl Attribute for DateTime < FixedOffset > {
715
- fn into_attr ( self : Self ) -> AttributeValue {
715
+ fn into_attr ( self ) -> AttributeValue {
716
716
AttributeValue {
717
717
s : Some ( self . to_rfc3339 ( ) ) ,
718
718
..Default :: default ( )
@@ -732,7 +732,7 @@ impl Attribute for DateTime<FixedOffset> {
732
732
/// An `rfc3339` formatted version of `SystemTime`, represented by the `S` AttributeValue type
733
733
#[ cfg( feature = "chrono" ) ]
734
734
impl Attribute for SystemTime {
735
- fn into_attr ( self : Self ) -> AttributeValue {
735
+ fn into_attr ( self ) -> AttributeValue {
736
736
let dt: DateTime < Utc > = self . into ( ) ;
737
737
dt. into_attr ( )
738
738
}
@@ -749,7 +749,7 @@ impl Attribute for SystemTime {
749
749
750
750
/// A `String` type, represented by the S AttributeValue type
751
751
impl Attribute for String {
752
- fn into_attr ( self : Self ) -> AttributeValue {
752
+ fn into_attr ( self ) -> AttributeValue {
753
753
AttributeValue {
754
754
s : Some ( self ) ,
755
755
..AttributeValue :: default ( )
@@ -761,7 +761,7 @@ impl Attribute for String {
761
761
}
762
762
763
763
impl < ' a > Attribute for Cow < ' a , str > {
764
- fn into_attr ( self : Self ) -> AttributeValue {
764
+ fn into_attr ( self ) -> AttributeValue {
765
765
AttributeValue {
766
766
s : Some ( match self {
767
767
Cow :: Owned ( o) => o,
@@ -778,7 +778,7 @@ impl<'a> Attribute for Cow<'a, str> {
778
778
/// A String Set type, represented by the SS AttributeValue type
779
779
#[ allow( clippy:: implicit_hasher) ]
780
780
impl Attribute for HashSet < String > {
781
- fn into_attr ( mut self : Self ) -> AttributeValue {
781
+ fn into_attr ( mut self ) -> AttributeValue {
782
782
AttributeValue {
783
783
ss : Some ( self . drain ( ) . collect ( ) ) ,
784
784
..AttributeValue :: default ( )
@@ -793,7 +793,7 @@ impl Attribute for HashSet<String> {
793
793
}
794
794
795
795
impl Attribute for BTreeSet < String > {
796
- fn into_attr ( self : Self ) -> AttributeValue {
796
+ fn into_attr ( self ) -> AttributeValue {
797
797
AttributeValue {
798
798
ss : Some ( self . into_iter ( ) . collect ( ) ) ,
799
799
..AttributeValue :: default ( )
@@ -810,7 +810,7 @@ impl Attribute for BTreeSet<String> {
810
810
/// A Binary Set type, represented by the BS AttributeValue type
811
811
#[ allow( clippy:: implicit_hasher) ]
812
812
impl Attribute for HashSet < Vec < u8 > > {
813
- fn into_attr ( mut self : Self ) -> AttributeValue {
813
+ fn into_attr ( mut self ) -> AttributeValue {
814
814
AttributeValue {
815
815
bs : Some ( self . drain ( ) . map ( Bytes :: from) . collect ( ) ) ,
816
816
..AttributeValue :: default ( )
@@ -826,7 +826,7 @@ impl Attribute for HashSet<Vec<u8>> {
826
826
827
827
// a Boolean type, represented by the BOOL AttributeValue type
828
828
impl Attribute for bool {
829
- fn into_attr ( self : Self ) -> AttributeValue {
829
+ fn into_attr ( self ) -> AttributeValue {
830
830
AttributeValue {
831
831
bool : Some ( self ) ,
832
832
..AttributeValue :: default ( )
@@ -839,7 +839,7 @@ impl Attribute for bool {
839
839
840
840
// a Binary type, represented by the B AttributeValue type
841
841
impl Attribute for bytes:: Bytes {
842
- fn into_attr ( self : Self ) -> AttributeValue {
842
+ fn into_attr ( self ) -> AttributeValue {
843
843
AttributeValue {
844
844
b : Some ( self ) ,
845
845
..AttributeValue :: default ( )
@@ -852,7 +852,7 @@ impl Attribute for bytes::Bytes {
852
852
853
853
// a Binary type, represented by the B AttributeValue type
854
854
impl Attribute for Vec < u8 > {
855
- fn into_attr ( self : Self ) -> AttributeValue {
855
+ fn into_attr ( self ) -> AttributeValue {
856
856
AttributeValue {
857
857
b : Some ( self . into ( ) ) ,
858
858
..AttributeValue :: default ( )
@@ -875,7 +875,7 @@ impl Attribute for Vec<u8> {
875
875
/// and implement `Attribute` for `YourType`. An `Vec<YourType>` implementation
876
876
/// will already be provided
877
877
impl < A : Attribute > Attribute for Vec < A > {
878
- fn into_attr ( mut self : Self ) -> AttributeValue {
878
+ fn into_attr ( mut self ) -> AttributeValue {
879
879
AttributeValue {
880
880
l : Some ( self . drain ( ..) . map ( |s| s. into_attr ( ) ) . collect ( ) ) ,
881
881
..AttributeValue :: default ( )
@@ -892,7 +892,7 @@ impl<A: Attribute> Attribute for Vec<A> {
892
892
}
893
893
894
894
impl < T : Attribute > Attribute for Option < T > {
895
- fn into_attr ( self : Self ) -> AttributeValue {
895
+ fn into_attr ( self ) -> AttributeValue {
896
896
match self {
897
897
Some ( value) => value. into_attr ( ) ,
898
898
_ => AttributeValue {
0 commit comments