Fixed Rust code examples in multiple files (due to commit 9628e25971).

This commit is contained in:
Project Nayuki 2018-10-14 05:03:33 +00:00
parent f2ea49b7d4
commit 3da57e5aa0
3 changed files with 3 additions and 3 deletions

View File

@ -181,7 +181,7 @@ Rust language:
let chrs: Vec<char> = "3141592653589793238462643383".chars().collect(); let chrs: Vec<char> = "3141592653589793238462643383".chars().collect();
let segs = QrSegment::make_segments(&chrs); let segs = QrSegment::make_segments(&chrs);
let qr = QrCode::encode_segments_advanced( let qr = QrCode::encode_segments_advanced(
&segs, QrCodeEcc::High, 5, 5, Some(2), false).unwrap(); &segs, QrCodeEcc::High, 5, 5, Some(Mask::new(2)), false).unwrap();
for y in 0 .. qr.size() { for y in 0 .. qr.size() {
for x in 0 .. qr.size() { for x in 0 .. qr.size() {
(... paint qr.get_module(x, y) ...) (... paint qr.get_module(x, y) ...)

View File

@ -47,7 +47,7 @@ Examples
let chrs: Vec<char> = "3141592653589793238462643383".chars().collect(); let chrs: Vec<char> = "3141592653589793238462643383".chars().collect();
let segs = QrSegment::make_segments(&chrs); let segs = QrSegment::make_segments(&chrs);
let qr = QrCode::encode_segments_advanced( let qr = QrCode::encode_segments_advanced(
&segs, QrCodeEcc::High, 5, 5, Some(2), false).unwrap(); &segs, QrCodeEcc::High, 5, 5, Some(Mask::new(2)), false).unwrap();
for y in 0 .. qr.size() { for y in 0 .. qr.size() {
for x in 0 .. qr.size() { for x in 0 .. qr.size() {
(... paint qr.get_module(x, y) ...) (... paint qr.get_module(x, y) ...)

View File

@ -72,7 +72,7 @@
//! let chrs: Vec<char> = "3141592653589793238462643383".chars().collect(); //! let chrs: Vec<char> = "3141592653589793238462643383".chars().collect();
//! let segs = QrSegment::make_segments(&chrs); //! let segs = QrSegment::make_segments(&chrs);
//! let qr = QrCode::encode_segments_advanced( //! let qr = QrCode::encode_segments_advanced(
//! &segs, QrCodeEcc::High, 5, 5, Some(2), false).unwrap(); //! &segs, QrCodeEcc::High, 5, 5, Some(Mask::new(2)), false).unwrap();
//! for y in 0 .. qr.size() { //! for y in 0 .. qr.size() {
//! for x in 0 .. qr.size() { //! for x in 0 .. qr.size() {
//! (... paint qr.get_module(x, y) ...) //! (... paint qr.get_module(x, y) ...)