summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/builder.rs4
-rw-r--r--src/file/source/file.rs2
-rw-r--r--src/lib.rs1
-rw-r--r--src/ser.rs20
4 files changed, 13 insertions, 14 deletions
diff --git a/src/builder.rs b/src/builder.rs
index f429ad4..4942b47 100644
--- a/src/builder.rs
+++ b/src/builder.rs
@@ -272,7 +272,7 @@ impl ConfigBuilder<AsyncState> {
///
/// Calling this method does not invoke any I/O. [`Source`] is only saved in internal register for later use.
#[must_use]
- pub fn add_source<T>(mut self, source: T) -> ConfigBuilder<AsyncState>
+ pub fn add_source<T>(mut self, source: T) -> Self
where
T: Source + Send + Sync + 'static,
{
@@ -284,7 +284,7 @@ impl ConfigBuilder<AsyncState> {
///
/// Calling this method does not invoke any I/O. [`AsyncSource`] is only saved in internal register for later use.
#[must_use]
- pub fn add_async_source<T>(mut self, source: T) -> ConfigBuilder<AsyncState>
+ pub fn add_async_source<T>(mut self, source: T) -> Self
where
T: AsyncSource + Send + Sync + 'static,
{
diff --git a/src/file/source/file.rs b/src/file/source/file.rs
index 9bd3ddd..a27c9d2 100644
--- a/src/file/source/file.rs
+++ b/src/file/source/file.rs
@@ -73,7 +73,7 @@ impl FileSourceFile {
}
None => {
- for (format, extensions) in ALL_EXTENSIONS.iter() {
+ for format in ALL_EXTENSIONS.keys() {
for ext in format.extensions() {
filename.set_extension(ext);
diff --git a/src/lib.rs b/src/lib.rs
index 9088c26..589d2d5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -17,7 +17,6 @@
//!
//! See the [examples](https://github.com/mehcode/config-rs/tree/master/examples) for
//! general usage information.
-#![allow(unused_variables)]
#![allow(unknown_lints)]
// #![warn(missing_docs)]
diff --git a/src/ser.rs b/src/ser.rs
index 3138488..72d5b01 100644
--- a/src/ser.rs
+++ b/src/ser.rs
@@ -231,7 +231,7 @@ impl<'a> ser::Serializer for &'a mut ConfigSerializer {
fn serialize_tuple_variant(
self,
- name: &'static str,
+ _name: &'static str,
_variant_index: u32,
variant: &'static str,
_len: usize,
@@ -253,7 +253,7 @@ impl<'a> ser::Serializer for &'a mut ConfigSerializer {
_name: &'static str,
_variant_index: u32,
variant: &'static str,
- len: usize,
+ _len: usize,
) -> Result<Self::SerializeStructVariant> {
self.push_key(variant);
Ok(self)
@@ -580,7 +580,7 @@ impl ser::SerializeSeq for StringKeySerializer {
type Ok = String;
type Error = ConfigError;
- fn serialize_element<T>(&mut self, value: &T) -> Result<()>
+ fn serialize_element<T>(&mut self, _value: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{
@@ -596,7 +596,7 @@ impl ser::SerializeTuple for StringKeySerializer {
type Ok = String;
type Error = ConfigError;
- fn serialize_element<T>(&mut self, value: &T) -> Result<()>
+ fn serialize_element<T>(&mut self, _value: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{
@@ -612,7 +612,7 @@ impl ser::SerializeTupleStruct for StringKeySerializer {
type Ok = String;
type Error = ConfigError;
- fn serialize_field<T>(&mut self, value: &T) -> Result<()>
+ fn serialize_field<T>(&mut self, _value: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{
@@ -628,7 +628,7 @@ impl ser::SerializeTupleVariant for StringKeySerializer {
type Ok = String;
type Error = ConfigError;
- fn serialize_field<T>(&mut self, value: &T) -> Result<()>
+ fn serialize_field<T>(&mut self, _value: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{
@@ -644,14 +644,14 @@ impl ser::SerializeMap for StringKeySerializer {
type Ok = String;
type Error = ConfigError;
- fn serialize_key<T>(&mut self, key: &T) -> Result<()>
+ fn serialize_key<T>(&mut self, _key: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{
unreachable!()
}
- fn serialize_value<T>(&mut self, value: &T) -> Result<()>
+ fn serialize_value<T>(&mut self, _value: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{
@@ -667,7 +667,7 @@ impl ser::SerializeStruct for StringKeySerializer {
type Ok = String;
type Error = ConfigError;
- fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
+ fn serialize_field<T>(&mut self, _key: &'static str, _value: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{
@@ -683,7 +683,7 @@ impl ser::SerializeStructVariant for StringKeySerializer {
type Ok = String;
type Error = ConfigError;
- fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
+ fn serialize_field<T>(&mut self, _key: &'static str, _value: &T) -> Result<()>
where
T: ?Sized + ser::Serialize,
{