From 9dddab008b587de333ea33c9c8be3712207d4ca0 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Sat, 4 Apr 2020 18:19:34 +0200 Subject: [PATCH] make push_number_checked public to handle structured append --- src/bits.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bits.rs b/src/bits.rs index 5d1f93f..1930c1c 100644 --- a/src/bits.rs +++ b/src/bits.rs @@ -63,7 +63,7 @@ impl Bits { /// that the number does not overflow the bits. /// /// Returns `Err(QrError::DataTooLong)` on overflow. - fn push_number_checked(&mut self, n: usize, number: usize) -> QrResult<()> { + pub fn push_number_checked(&mut self, n: usize, number: usize) -> QrResult<()> { if n > 16 || number >= (1 << n) { Err(QrError::DataTooLong) } else {