diff options
author | Daniel Eades <danieleades@hotmail.com> | 2021-12-27 11:09:06 +0000 |
---|---|---|
committer | Daniel Eades <danieleades@hotmail.com> | 2021-12-29 12:12:06 +0000 |
commit | f9bf236a4890e293f5c4f074022d671a6a02ae0f (patch) | |
tree | fd295c096daa77c2807dff4dff9b76edf01ad4cb /src | |
parent | 34439bd4a508cca344414a88e970cc7c53cabaa0 (diff) |
silence/address unused code warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/file/source/file.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/ser.rs | 20 |
3 files changed, 11 insertions, 12 deletions
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); @@ -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)] @@ -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, { |