From a6f886f6ffcf96e4a6e4f779f85c777cde54a22b Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Fri, 1 Oct 2021 18:08:11 +0000 Subject: [PATCH] Fixed example Rust code in readme, related to commit c8e1b0caed50. --- Readme.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.markdown b/Readme.markdown index 97c5cdc..69f0944 100644 --- a/Readme.markdown +++ b/Readme.markdown @@ -174,8 +174,8 @@ let svg = to_svg_string(&qr, 4); // See qrcodegen-demo // Manual operation let text: &str = "3141592653589793238462643383"; let segs = QrSegment::make_segments(text); -let qr = QrCode::encode_segments_advanced( - &segs, QrCodeEcc::High, 5, 5, Some(Mask::new(2)), false).unwrap(); +let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::High, + Version::new(5), Version::new(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) ...)