Browse Source

Fix warnings caused by unnecessary `mut` qualifiers (#735)

index-subcmd
Jakub Wieczorek Vincent Prouillet 5 years ago
parent
commit
b716401217
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      components/imageproc/src/lib.rs
  2. +1
    -1
      components/library/src/library.rs
  3. +1
    -1
      components/utils/src/de.rs

+ 1
- 1
components/imageproc/src/lib.rs View File

@@ -300,7 +300,7 @@ impl ImageOp {


match self.format { match self.format {
Format::Png => { 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())?; enc.encode(&img.raw_pixels(), img_w, img_h, img.color())?;
} }
Format::Jpeg(q) => { Format::Jpeg(q) => {


+ 1
- 1
components/library/src/library.rs View File

@@ -139,7 +139,7 @@ impl Library {
let parent_is_transparent; let parent_is_transparent;
// We need to get a reference to a section later so keep the scope of borrowing small // 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); section.pages.push(key);
parent_is_transparent = section.meta.transparent; parent_is_transparent = section.meta.transparent;
} }


+ 1
- 1
components/utils/src/de.rs View File

@@ -40,7 +40,7 @@ pub fn fix_toml_dates(table: Map<String, Value>) -> Value {


for (key, value) in table { for (key, value) in table {
match value { match value {
Value::Object(mut o) => {
Value::Object(o) => {
new.insert(key, convert_toml_date(o)); new.insert(key, convert_toml_date(o));
} }
_ => { _ => {


Loading…
Cancel
Save