From fa40eec147ef8e55e90d9ac0725f02f2be10d853 Mon Sep 17 00:00:00 2001 From: kennytm Date: Wed, 24 Sep 2014 16:02:36 +0800 Subject: [PATCH] rustup. --- src/bits.rs | 2 +- src/ec.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bits.rs b/src/bits.rs index e7b25b9..2e93345 100644 --- a/src/bits.rs +++ b/src/bits.rs @@ -835,7 +835,7 @@ pub fn encode_auto(data: &[u8], ec_level: ErrorCorrectionLevel) -> QrResult Vec { - let mut res = Vec::from_slice(data); - res.grow(ec_code_size, &0); + let mut res = data.to_vec(); + res.grow(ec_code_size, 0); let data_len = data.len(); let log_den = GENERATOR_POLYNOMIALS[ec_code_size];