Skip to content

Commit 54dbf0c

Browse files
authored
Merge pull request softprops#150 from softprops/fix-clippy-errors
fix clippy errors
2 parents dc8ba09 + de4c777 commit 54dbf0c

File tree

4 files changed

+29
-26
lines changed

4 files changed

+29
-26
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@ name: Main
33

44
on:
55
push:
6+
paths-ignore:
7+
- '*.md'
68
branches:
79
- master
810
tags:
911
- '**'
1012
pull_request:
13+
paths-ignore:
14+
- '*.md'
15+
branches:
16+
- master
17+
18+
#env:
19+
# CARGO_TERM_COLOR: always
1120

1221
jobs:
1322
codestyle:

dynomite/examples/demo.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ use dynomite::{
88
Attributes, DynamoDbExt, Item, Retries,
99
};
1010
use futures::{future, TryStreamExt};
11-
#[cfg(feature = "default")]
12-
use rusoto_core_default::Region;
13-
#[cfg(feature = "rustls")]
14-
use rusoto_core_rustls::Region;
11+
use rusoto_core::Region;
1512
use std::{convert::TryFrom, error::Error};
1613
use uuid::Uuid;
1714

dynomite/examples/local.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ use dynomite::{
1414
DynamoDbExt, Item, Retries,
1515
};
1616
use futures::{future, TryStreamExt};
17-
#[cfg(feature = "default")]
18-
use rusoto_core_default::Region;
19-
#[cfg(feature = "rustls")]
20-
use rusoto_core_rustls::Region;
17+
use rusoto_core::Region;
2118
use std::{convert::TryFrom, error::Error};
2219
use uuid::Uuid;
2320

dynomite/src/lib.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -541,13 +541,13 @@ pub trait Item: IntoAttributes + FromAttributes {
541541
/// ```
542542
pub trait Attribute: Sized {
543543
/// Returns a conversion into an `AttributeValue`
544-
fn into_attr(self: Self) -> AttributeValue;
544+
fn into_attr(self) -> AttributeValue;
545545
/// Returns a fallible conversion from an `AttributeValue`
546546
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError>;
547547
}
548548

549549
impl Attribute for AttributeValue {
550-
fn into_attr(self: Self) -> AttributeValue {
550+
fn into_attr(self) -> AttributeValue {
551551
self
552552
}
553553
fn from_attr(value: AttributeValue) -> Result<Self, AttributeError> {
@@ -635,7 +635,7 @@ impl<A: Attribute> IntoAttributes for BTreeMap<String, A> {
635635

636636
/// A Map type for all hash-map-like values, represented as the `M` AttributeValue type
637637
impl<T: IntoAttributes + FromAttributes> Attribute for T {
638-
fn into_attr(self: Self) -> AttributeValue {
638+
fn into_attr(self) -> AttributeValue {
639639
let mut map = HashMap::new();
640640
self.into_attrs(&mut map);
641641
AttributeValue {
@@ -651,7 +651,7 @@ impl<T: IntoAttributes + FromAttributes> Attribute for T {
651651
/// A `String` type for `Uuids`, represented by the `S` AttributeValue type
652652
#[cfg(feature = "uuid")]
653653
impl Attribute for Uuid {
654-
fn into_attr(self: Self) -> AttributeValue {
654+
fn into_attr(self) -> AttributeValue {
655655
AttributeValue {
656656
s: Some(self.to_hyphenated().to_string()),
657657
..AttributeValue::default()
@@ -668,7 +668,7 @@ impl Attribute for Uuid {
668668
/// An `rfc3339` formatted version of `DateTime<Utc>`, represented by the `S` AttributeValue type
669669
#[cfg(feature = "chrono")]
670670
impl Attribute for DateTime<Utc> {
671-
fn into_attr(self: Self) -> AttributeValue {
671+
fn into_attr(self) -> AttributeValue {
672672
AttributeValue {
673673
s: Some(self.to_rfc3339()),
674674
..Default::default()
@@ -690,7 +690,7 @@ impl Attribute for DateTime<Utc> {
690690
/// An `rfc3339` formatted version of `DateTime<Local>`, represented by the `S` AttributeValue type
691691
#[cfg(feature = "chrono")]
692692
impl Attribute for DateTime<Local> {
693-
fn into_attr(self: Self) -> AttributeValue {
693+
fn into_attr(self) -> AttributeValue {
694694
AttributeValue {
695695
s: Some(self.to_rfc3339()),
696696
..Default::default()
@@ -712,7 +712,7 @@ impl Attribute for DateTime<Local> {
712712
/// An `rfc3339` formatted version of `DateTime<FixedOffset>`, represented by the `S` AttributeValue type
713713
#[cfg(feature = "chrono")]
714714
impl Attribute for DateTime<FixedOffset> {
715-
fn into_attr(self: Self) -> AttributeValue {
715+
fn into_attr(self) -> AttributeValue {
716716
AttributeValue {
717717
s: Some(self.to_rfc3339()),
718718
..Default::default()
@@ -732,7 +732,7 @@ impl Attribute for DateTime<FixedOffset> {
732732
/// An `rfc3339` formatted version of `SystemTime`, represented by the `S` AttributeValue type
733733
#[cfg(feature = "chrono")]
734734
impl Attribute for SystemTime {
735-
fn into_attr(self: Self) -> AttributeValue {
735+
fn into_attr(self) -> AttributeValue {
736736
let dt: DateTime<Utc> = self.into();
737737
dt.into_attr()
738738
}
@@ -749,7 +749,7 @@ impl Attribute for SystemTime {
749749

750750
/// A `String` type, represented by the S AttributeValue type
751751
impl Attribute for String {
752-
fn into_attr(self: Self) -> AttributeValue {
752+
fn into_attr(self) -> AttributeValue {
753753
AttributeValue {
754754
s: Some(self),
755755
..AttributeValue::default()
@@ -761,7 +761,7 @@ impl Attribute for String {
761761
}
762762

763763
impl<'a> Attribute for Cow<'a, str> {
764-
fn into_attr(self: Self) -> AttributeValue {
764+
fn into_attr(self) -> AttributeValue {
765765
AttributeValue {
766766
s: Some(match self {
767767
Cow::Owned(o) => o,
@@ -778,7 +778,7 @@ impl<'a> Attribute for Cow<'a, str> {
778778
/// A String Set type, represented by the SS AttributeValue type
779779
#[allow(clippy::implicit_hasher)]
780780
impl Attribute for HashSet<String> {
781-
fn into_attr(mut self: Self) -> AttributeValue {
781+
fn into_attr(mut self) -> AttributeValue {
782782
AttributeValue {
783783
ss: Some(self.drain().collect()),
784784
..AttributeValue::default()
@@ -793,7 +793,7 @@ impl Attribute for HashSet<String> {
793793
}
794794

795795
impl Attribute for BTreeSet<String> {
796-
fn into_attr(self: Self) -> AttributeValue {
796+
fn into_attr(self) -> AttributeValue {
797797
AttributeValue {
798798
ss: Some(self.into_iter().collect()),
799799
..AttributeValue::default()
@@ -810,7 +810,7 @@ impl Attribute for BTreeSet<String> {
810810
/// A Binary Set type, represented by the BS AttributeValue type
811811
#[allow(clippy::implicit_hasher)]
812812
impl Attribute for HashSet<Vec<u8>> {
813-
fn into_attr(mut self: Self) -> AttributeValue {
813+
fn into_attr(mut self) -> AttributeValue {
814814
AttributeValue {
815815
bs: Some(self.drain().map(Bytes::from).collect()),
816816
..AttributeValue::default()
@@ -826,7 +826,7 @@ impl Attribute for HashSet<Vec<u8>> {
826826

827827
// a Boolean type, represented by the BOOL AttributeValue type
828828
impl Attribute for bool {
829-
fn into_attr(self: Self) -> AttributeValue {
829+
fn into_attr(self) -> AttributeValue {
830830
AttributeValue {
831831
bool: Some(self),
832832
..AttributeValue::default()
@@ -839,7 +839,7 @@ impl Attribute for bool {
839839

840840
// a Binary type, represented by the B AttributeValue type
841841
impl Attribute for bytes::Bytes {
842-
fn into_attr(self: Self) -> AttributeValue {
842+
fn into_attr(self) -> AttributeValue {
843843
AttributeValue {
844844
b: Some(self),
845845
..AttributeValue::default()
@@ -852,7 +852,7 @@ impl Attribute for bytes::Bytes {
852852

853853
// a Binary type, represented by the B AttributeValue type
854854
impl Attribute for Vec<u8> {
855-
fn into_attr(self: Self) -> AttributeValue {
855+
fn into_attr(self) -> AttributeValue {
856856
AttributeValue {
857857
b: Some(self.into()),
858858
..AttributeValue::default()
@@ -875,7 +875,7 @@ impl Attribute for Vec<u8> {
875875
/// and implement `Attribute` for `YourType`. An `Vec<YourType>` implementation
876876
/// will already be provided
877877
impl<A: Attribute> Attribute for Vec<A> {
878-
fn into_attr(mut self: Self) -> AttributeValue {
878+
fn into_attr(mut self) -> AttributeValue {
879879
AttributeValue {
880880
l: Some(self.drain(..).map(|s| s.into_attr()).collect()),
881881
..AttributeValue::default()
@@ -892,7 +892,7 @@ impl<A: Attribute> Attribute for Vec<A> {
892892
}
893893

894894
impl<T: Attribute> Attribute for Option<T> {
895-
fn into_attr(self: Self) -> AttributeValue {
895+
fn into_attr(self) -> AttributeValue {
896896
match self {
897897
Some(value) => value.into_attr(),
898898
_ => AttributeValue {

0 commit comments

Comments
 (0)