Skip to content

Commit

Permalink
fixup! feat: add .mode option to QRBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanvivien committed May 7, 2024
1 parent 1be4a87 commit 2eef2b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl QRCode {
) -> Result<Self, QRCodeError> {
use crate::placement::create_matrix;

let mode = mode.unwrap_or(encode::best_encoding(input));
let mode = mode.unwrap_or_else(|| encode::best_encoding(input));
let level = ecl.unwrap_or(ECL::Q);

let version = match Version::get(mode, level, input.len()) {
Expand Down

0 comments on commit 2eef2b3

Please sign in to comment.