Fix warnings caused by unnecessary mut
qualifiers (#735)
This commit is contained in:
parent
90dad05c67
commit
b716401217
|
@ -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) => {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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…
Reference in a new issue