[librsvg] Prettify an array comparison
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Prettify an array comparison
- Date: Fri, 30 Nov 2018 00:31:26 +0000 (UTC)
commit ff00a25bfd1194e6dc6b798493ca91afb2ec320c
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Nov 29 13:57:51 2018 -0600
Prettify an array comparison
rsvg_internals/src/io.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/io.rs b/rsvg_internals/src/io.rs
index a93c0b9e..9cd7fb16 100644
--- a/rsvg_internals/src/io.rs
+++ b/rsvg_internals/src/io.rs
@@ -82,7 +82,7 @@ fn get_input_stream_for_loading(
let buf = buffered.peek_buffer();
assert!(buf.len() >= 2);
- if buf[0] == GZ_MAGIC_0 && buf[1] == GZ_MAGIC_1 {
+ if buf[0..2] == [GZ_MAGIC_0, GZ_MAGIC_1] {
let decomp = ZlibDecompressor::new(ZlibCompressorFormat::Gzip);
let converter = ConverterInputStream::new(&buffered, &decomp);
Ok(converter.upcast::<InputStream>())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]