where
Serde: Deserialize<'de>,
D: Deserializer<'de>,
diff --git a/amadeus-aws/src/file.rs b/amadeus-aws/src/file.rs
index af3d77e2..c742c249 100644
--- a/amadeus-aws/src/file.rs
+++ b/amadeus-aws/src/file.rs
@@ -84,7 +84,7 @@ impl Directory for S3Directory {
|| (current_path.depth() > 0
&& current_path.last().unwrap() != path[current_path.depth() - 1])
{
- current_path.pop().unwrap();
+ let _ = current_path.pop().unwrap();
}
while path.len() > current_path.depth() {
current_path.push(path[current_path.depth()]);
@@ -241,7 +241,7 @@ impl Page for S3Page {
let mut buf_ = vec![0; len].into_boxed_slice();
let mut buf = &mut *buf_;
let len: u64 = len.try_into().unwrap();
- let mut pos = 0u64;
+ let mut pos = 0_u64;
let mut errors: usize = 0;
let end = offset + len - 1;
while !buf.is_empty() {
diff --git a/amadeus-aws/src/lib.rs b/amadeus-aws/src/lib.rs
index e5ab6df7..8ca9a86e 100644
--- a/amadeus-aws/src/lib.rs
+++ b/amadeus-aws/src/lib.rs
@@ -1,5 +1,34 @@
-#![doc(html_root_url = "https://docs.rs/amadeus-aws/0.2.5")]
+//! Harmonious distributed data processing & analysis in Rust.
+//!
+//!
+//! 📦 Crates.io │ 📑 GitHub │ 💬 Chat
+//!
+//!
+//! This is a support crate of [Amadeus](https://github.com/constellation-rs/amadeus) and is not intended to be used directly. These types are re-exposed in [`amadeus::source`](https://docs.rs/amadeus/0.3/amadeus/source/index.html).
+
+#![doc(html_root_url = "https://docs.rs/amadeus-aws/0.3.0")]
#![feature(type_alias_impl_trait)]
+#![warn(
+ // missing_copy_implementations,
+ // missing_debug_implementations,
+ // missing_docs,
+ trivial_numeric_casts,
+ unused_import_braces,
+ unused_qualifications,
+ unused_results,
+ unreachable_pub,
+ clippy::pedantic,
+)]
+#![allow(
+ clippy::module_name_repetitions,
+ clippy::if_not_else,
+ clippy::too_many_lines,
+ clippy::must_use_candidate,
+ clippy::type_repetition_in_bounds,
+ clippy::filter_map,
+ clippy::missing_errors_doc
+)]
+#![deny(unsafe_code)]
mod cloudfront;
mod file;
@@ -144,7 +173,7 @@ pub enum AwsError {
NoSuchBucket(String),
NoSuchKey(String),
HttpDispatch(rusoto_core::request::HttpDispatchError),
- Credentials(rusoto_credential::CredentialsError),
+ Credentials(CredentialsError),
Validation(String),
ParseError(String),
Unknown(rusoto_core::request::BufferedHttpResponse),
@@ -156,8 +185,8 @@ impl Clone for AwsError {
Self::NoSuchBucket(err) => Self::NoSuchBucket(err.clone()),
Self::NoSuchKey(err) => Self::NoSuchKey(err.clone()),
Self::HttpDispatch(err) => Self::HttpDispatch(err.clone()),
- Self::Credentials(rusoto_credential::CredentialsError { message }) => {
- Self::Credentials(rusoto_credential::CredentialsError {
+ Self::Credentials(CredentialsError { message }) => {
+ Self::Credentials(CredentialsError {
message: message.clone(),
})
}
@@ -179,12 +208,12 @@ impl Clone for AwsError {
impl PartialEq for AwsError {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
- (Self::NoSuchBucket(a), Self::NoSuchBucket(b)) => a == b,
- (Self::NoSuchKey(a), Self::NoSuchKey(b)) => a == b,
+ (Self::NoSuchBucket(a), Self::NoSuchBucket(b))
+ | (Self::NoSuchKey(a), Self::NoSuchKey(b))
+ | (Self::Validation(a), Self::Validation(b))
+ | (Self::ParseError(a), Self::ParseError(b)) => a == b,
(Self::HttpDispatch(a), Self::HttpDispatch(b)) => a == b,
(Self::Credentials(a), Self::Credentials(b)) => a == b,
- (Self::Validation(a), Self::Validation(b)) => a == b,
- (Self::ParseError(a), Self::ParseError(b)) => a == b,
(Self::Unknown(a), Self::Unknown(b)) => a == b,
(Self::Io(a), Self::Io(b)) => a == b,
_ => false,
@@ -195,12 +224,12 @@ impl error::Error for AwsError {}
impl Display for AwsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
- Self::NoSuchBucket(err) => err.fmt(f),
- Self::NoSuchKey(err) => err.fmt(f),
+ Self::NoSuchBucket(err)
+ | Self::NoSuchKey(err)
+ | Self::Validation(err)
+ | Self::ParseError(err) => err.fmt(f),
Self::HttpDispatch(err) => err.fmt(f),
Self::Credentials(err) => err.fmt(f),
- Self::Validation(err) => err.fmt(f),
- Self::ParseError(err) => err.fmt(f),
Self::Unknown(err) => fmt::Debug::fmt(err, f),
Self::Io(err) => err.fmt(f),
}
diff --git a/amadeus-commoncrawl/Cargo.toml b/amadeus-commoncrawl/Cargo.toml
index f1061287..cb1aad0b 100644
--- a/amadeus-commoncrawl/Cargo.toml
+++ b/amadeus-commoncrawl/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "amadeus-commoncrawl"
-version = "0.2.5"
+version = "0.3.0"
license = "MIT OR Apache-2.0"
authors = ["Stephen Becker IV ", "Alec Mocatta "]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
@@ -10,7 +10,7 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
-documentation = "https://docs.rs/amadeus/0.2.5"
+documentation = "https://docs.rs/amadeus/0.3.0"
readme = "README.md"
edition = "2018"
@@ -19,8 +19,8 @@ azure-devops = { project = "alecmocatta/amadeus", pipeline = "tests" }
maintenance = { status = "actively-developed" }
[dependencies]
-amadeus-core = { version = "=0.2.5", path = "../amadeus-core" }
-amadeus-types = { version = "=0.2.5", path = "../amadeus-types" }
+amadeus-core = { version = "=0.3.0", path = "../amadeus-core" }
+amadeus-types = { version = "=0.3.0", path = "../amadeus-types" }
async-compression = { version = "0.3.3", features = ["gzip", "futures-bufread"] }
futures = "0.3"
nom = "4.2.3"
diff --git a/amadeus-commoncrawl/src/commoncrawl.rs b/amadeus-commoncrawl/src/commoncrawl.rs
index 299da35d..07e26857 100644
--- a/amadeus-commoncrawl/src/commoncrawl.rs
+++ b/amadeus-commoncrawl/src/commoncrawl.rs
@@ -14,7 +14,7 @@ const CHOMP: usize = 2 << 13; // 8 KiB
#[pin_project]
#[derive(Clone, Debug)]
-pub struct WarcParser {
+pub(crate) struct WarcParser {
#[pin]
input: I,
state: WarcParserState,
@@ -30,7 +30,7 @@ enum WarcParserState {
Done,
}
impl WarcParser {
- pub fn new(input: I) -> WarcParser {
+ pub(crate) fn new(input: I) -> WarcParser {
WarcParser {
input,
state: WarcParserState::Info,
@@ -43,7 +43,7 @@ impl WarcParser
where
I: Read,
{
- pub fn next_borrowed(&mut self) -> Result