mirror of
https://gitee.com/openharmony/third_party_qrcodegen
synced 2024-11-23 07:10:22 +00:00
Fixed Rust code examples in multiple files (due to commit 9628e25971
).
This commit is contained in:
parent
f2ea49b7d4
commit
3da57e5aa0
@ -181,7 +181,7 @@ Rust language:
|
||||
let chrs: Vec<char> = "3141592653589793238462643383".chars().collect();
|
||||
let segs = QrSegment::make_segments(&chrs);
|
||||
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 x in 0 .. qr.size() {
|
||||
(... paint qr.get_module(x, y) ...)
|
||||
|
@ -47,7 +47,7 @@ Examples
|
||||
let chrs: Vec<char> = "3141592653589793238462643383".chars().collect();
|
||||
let segs = QrSegment::make_segments(&chrs);
|
||||
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 x in 0 .. qr.size() {
|
||||
(... paint qr.get_module(x, y) ...)
|
||||
|
@ -72,7 +72,7 @@
|
||||
//! let chrs: Vec<char> = "3141592653589793238462643383".chars().collect();
|
||||
//! let segs = QrSegment::make_segments(&chrs);
|
||||
//! 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 x in 0 .. qr.size() {
|
||||
//! (... paint qr.get_module(x, y) ...)
|
||||
|
Loading…
Reference in New Issue
Block a user