Fix warnings caused by unnecessary mut qualifiers (#735)

This commit is contained in:
Jakub Wieczorek 2019-07-05 00:04:39 +02:00 committed by Vincent Prouillet
parent 90dad05c67
commit b716401217
3 changed files with 3 additions and 3 deletions

View file

@ -300,7 +300,7 @@ impl ImageOp {
match self.format {
Format::Png => {
let mut enc = PNGEncoder::new(&mut f);
let enc = PNGEncoder::new(&mut f);
enc.encode(&img.raw_pixels(), img_w, img_h, img.color())?;
}
Format::Jpeg(q) => {

View file

@ -139,7 +139,7 @@ impl Library {
let parent_is_transparent;
// We need to get a reference to a section later so keep the scope of borrowing small
{
let mut section = self.sections.get_mut(*section_key).unwrap();
let section = self.sections.get_mut(*section_key).unwrap();
section.pages.push(key);
parent_is_transparent = section.meta.transparent;
}

View file

@ -40,7 +40,7 @@ pub fn fix_toml_dates(table: Map<String, Value>) -> Value {
for (key, value) in table {
match value {
Value::Object(mut o) => {
Value::Object(o) => {
new.insert(key, convert_toml_date(o));
}
_ => {