| 1 | //! UTF-8 rendering, with 2 pixels per symbol. |
| 2 | |
| 3 | use craterust-analyzer cargo qrcode 0.14.1 crate/::renderrust-analyzer cargo qrcode 0.14.1 render/::{Canvasrust-analyzer cargo qrcode 0.14.1 render/Canvas# as RenderCanvasrust-analyzer cargo qrcode 0.14.1 render/Canvas#, Colorrust-analyzer cargo qrcode 0.14.1 types/Color#, Pixelrust-analyzer cargo qrcode 0.14.1 render/Pixel#}; |
| 4 | |
| 5 | const CODEPAGErust-analyzer cargo qrcode 0.14.1 render/unicode/CODEPAGE.: [&str; 4] = [" ", "\u{2584}", "\u{2580}", "\u{2588}"]; |
| 6 | |
| 7 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)] |
| 8 | pub enum Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2# { |
| 9 | Darkrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Dark#, |
| 10 | Lightrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Light#, |
| 11 | } |
| 12 | |
| 13 | impl Pixelrust-analyzer cargo qrcode 0.14.1 render/Pixel# for Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2# { |
| 14 | type Imagerust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2][Pixel]Image# = Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#; |
| 15 | type Canvasrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2][Pixel]Canvas# = Canvas1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#; |
| 16 | fn default_colorrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2][Pixel]default_color().(color: Colorrust-analyzer cargo qrcode 0.14.1 types/Color#) -> Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2# { |
| 17 | color.selectrust-analyzer cargo qrcode 0.14.1 types/impl#[Color]select().(Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#::Darkrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Dark#, Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#::Lightrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Light#) |
| 18 | } |
| 19 | fn default_unit_sizerust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2][Pixel]default_unit_size().() -> (u32, u32) { |
| 20 | (1, 1) |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | impl Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2# { |
| 25 | fn valuerust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2]value().(self) -> u8 { |
| 26 | match self { |
| 27 | Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#::Darkrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Dark# => 1, |
| 28 | Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#::Lightrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Light# => 0, |
| 29 | } |
| 30 | } |
| 31 | fn parse_2_bitsrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2]parse_2_bits().(sym: u8) -> &'static str { |
| 32 | CODEPAGErust-analyzer cargo qrcode 0.14.1 render/unicode/CODEPAGE.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().usize::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[usize][`From<u8>`]from().(sym)]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | pub struct Canvas1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2# { |
| 37 | canvasrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#canvas.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, |
| 38 | widthrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#width.: u32, |
| 39 | dark_pixelrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#dark_pixel.: u8, |
| 40 | } |
| 41 | |
| 42 | impl RenderCanvasrust-analyzer cargo qrcode 0.14.1 render/Canvas# for Canvas1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2# { |
| 43 | type Pixelrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Canvas1x2][Canvas]Pixel# = Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#; |
| 44 | type Imagerust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Canvas1x2][Canvas]Image# = Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#; |
| 45 | |
| 46 | fn newrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Canvas1x2][Canvas]new().(width: u32, height: u32, dark_pixel: Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#, light_pixel: Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#) -> Selfrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Canvas1x2][Canvas] { |
| 47 | let a = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![light_pixel.valuerust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2]value().(); (width *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). height) as usize]; |
| 48 | Canvas1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2# { widthrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#width., canvasrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#canvas.: a, dark_pixelrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#dark_pixel.: dark_pixel.valuerust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2]value().() } |
| 49 | } |
| 50 | |
| 51 | fn draw_dark_pixelrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Canvas1x2][Canvas]draw_dark_pixel().(&mut self, x: u32, y: u32) { |
| 52 | self.canvasrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#canvas.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Mul<Self>`]mul().self.widthrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#width.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = self.dark_pixelrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#dark_pixel.; |
| 53 | } |
| 54 | |
| 55 | fn into_imagerust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Canvas1x2][Canvas]into_image().(self) -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# { |
| 56 | self.canvasrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#canvas. |
| 57 | // Chopping array into 1-line sized fragments |
| 58 | .chunks_exactrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks_exact().(self.widthrust-analyzer cargo qrcode 0.14.1 render/unicode/Canvas1x2#width. as usize) |
| 59 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<&[u8]>>() |
| 60 | // And then glueing every 2 lines. |
| 61 | .chunksrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]chunks().(2) |
| 62 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|rows| { |
| 63 | { |
| 64 | // Then zipping those 2 lines together into a single 2-bit number list. |
| 65 | if rows.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().2 { |
| 66 | rows[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().ziprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#zip().(rows[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|(top, bot)| (top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u8`][`Mul<u8>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u8`][`Mul<u8>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u8`][`Mul<u8>`]mul().2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Add<&u8>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Add<&u8>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Add<&u8>`]add().bot)).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>>() |
| 67 | } else { |
| 68 | rows[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|top| (top rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u8`][`Mul<u8>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u8`][`Mul<u8>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u8`][`Mul<u8>`]mul().2)).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>>() |
| 69 | } |
| 70 | } |
| 71 | .into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().() |
| 72 | // Mapping those 2-bit numbers to corresponding pixels. |
| 73 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#::parse_2_bitsrust-analyzer cargo qrcode 0.14.1 render/unicode/impl#[Dense1x2]parse_2_bits().) |
| 74 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<&str>>() |
| 75 | .concatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]concat().() |
| 76 | }) |
| 77 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>() |
| 78 | .joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().("\n") |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 83 | fn test_render_to_utf8_stringrust-analyzer cargo qrcode 0.14.1 render/unicode/test_render_to_utf8_string().() { |
| 84 | use craterust-analyzer cargo qrcode 0.14.1 crate/::renderrust-analyzer cargo qrcode 0.14.1 render/::Rendererrust-analyzer cargo qrcode 0.14.1 render/Renderer#; |
| 85 | let colors = &[Colorrust-analyzer cargo qrcode 0.14.1 types/Color#::Darkrust-analyzer cargo qrcode 0.14.1 types/Color#Dark#, Colorrust-analyzer cargo qrcode 0.14.1 types/Color#::Lightrust-analyzer cargo qrcode 0.14.1 types/Color#Light#, Colorrust-analyzer cargo qrcode 0.14.1 types/Color#::Lightrust-analyzer cargo qrcode 0.14.1 types/Color#Light#, Colorrust-analyzer cargo qrcode 0.14.1 types/Color#::Darkrust-analyzer cargo qrcode 0.14.1 types/Color#Dark#]; |
| 86 | let image: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# = Rendererrust-analyzer cargo qrcode 0.14.1 render/Renderer#::<Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#>::newrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]new().(colors, 2, 1).buildrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]build().(); |
| 87 | |
| 88 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(&image, " β \n β "); |
| 89 | |
| 90 | let image2 = Rendererrust-analyzer cargo qrcode 0.14.1 render/Renderer#::<Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#>::newrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]new().(colors, 2, 1).module_dimensionsrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]module_dimensions().(2, 2).buildrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]build().(); |
| 91 | |
| 92 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(&image2, " \n ββ \n ββ \n "); |
| 93 | } |
| 94 | |
| 95 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 96 | fn integration_render_utf8_1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/integration_render_utf8_1x2().() { |
| 97 | use craterust-analyzer cargo qrcode 0.14.1 crate/::renderrust-analyzer cargo qrcode 0.14.1 render/::unicoderust-analyzer cargo qrcode 0.14.1 render/unicode/::Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#; |
| 98 | use craterust-analyzer cargo qrcode 0.14.1 crate/::{EcLevelrust-analyzer cargo qrcode 0.14.1 types/EcLevel#, QrCoderust-analyzer cargo qrcode 0.14.1 QrCode#, Versionrust-analyzer cargo qrcode 0.14.1 types/Version#}; |
| 99 | |
| 100 | let code = QrCoderust-analyzer cargo qrcode 0.14.1 QrCode#::with_versionrust-analyzer cargo qrcode 0.14.1 impl#[QrCode]with_version().(b"09876542", Versionrust-analyzer cargo qrcode 0.14.1 types/Version#::Microrust-analyzer cargo qrcode 0.14.1 types/Version#Micro#(2), EcLevelrust-analyzer cargo qrcode 0.14.1 types/EcLevel#::Lrust-analyzer cargo qrcode 0.14.1 types/EcLevel#L#).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 101 | let image = code.renderrust-analyzer cargo qrcode 0.14.1 impl#[QrCode]render().::<Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#>().module_dimensionsrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]module_dimensions().(1, 1).buildrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]build().(); |
| 102 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 103 | image, |
| 104 | Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]new().() |
| 105 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " \n" |
| 106 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " βββββββ β β β \n" |
| 107 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " β βββ β β β \n" |
| 108 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " β βββ β ββ β \n" |
| 109 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " βββββββ βββ β \n" |
| 110 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " ββ ββββββββββ \n" |
| 111 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " βββββ ββ β ββ \n" |
| 112 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " βββ β ββ β β \n" |
| 113 | +rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`Add<&str>`]add(). " " |
| 114 | ) |
| 115 | } |
| 116 | |
| 117 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 118 | fn integration_render_utf8_1x2_invertedrust-analyzer cargo qrcode 0.14.1 render/unicode/integration_render_utf8_1x2_inverted().() { |
| 119 | use craterust-analyzer cargo qrcode 0.14.1 crate/::renderrust-analyzer cargo qrcode 0.14.1 render/::unicoderust-analyzer cargo qrcode 0.14.1 render/unicode/::Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#; |
| 120 | use craterust-analyzer cargo qrcode 0.14.1 crate/::{EcLevelrust-analyzer cargo qrcode 0.14.1 types/EcLevel#, QrCoderust-analyzer cargo qrcode 0.14.1 QrCode#, Versionrust-analyzer cargo qrcode 0.14.1 types/Version#}; |
| 121 | |
| 122 | let code = QrCoderust-analyzer cargo qrcode 0.14.1 QrCode#::with_versionrust-analyzer cargo qrcode 0.14.1 impl#[QrCode]with_version().(b"12345678", Versionrust-analyzer cargo qrcode 0.14.1 types/Version#::Microrust-analyzer cargo qrcode 0.14.1 types/Version#Micro#(2), EcLevelrust-analyzer cargo qrcode 0.14.1 types/EcLevel#::Lrust-analyzer cargo qrcode 0.14.1 types/EcLevel#L#).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 123 | let image = code |
| 124 | .renderrust-analyzer cargo qrcode 0.14.1 impl#[QrCode]render().::<Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#>() |
| 125 | .dark_colorrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]dark_color().(Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#::Lightrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Light#) |
| 126 | .light_colorrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]light_color().(Dense1x2rust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#::Darkrust-analyzer cargo qrcode 0.14.1 render/unicode/Dense1x2#Dark#) |
| 127 | .module_dimensionsrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]module_dimensions().(1, 1) |
| 128 | .buildrust-analyzer cargo qrcode 0.14.1 render/impl#[`Renderer<'a, P>`]build().(); |
| 129 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 130 | image, |
| 131 | "βββββββββββββββββ\n\ |
| 132 | ββ βββββ ββββββββ\n\ |
| 133 | ββ β β β β ββ\n\ |
| 134 | ββ βββββ ββββββββ\n\ |
| 135 | ββββββββββββββ ββ\n\ |
| 136 | βββ β β βββ ββββ\n\ |
| 137 | βββββββ βββ βββββ\n\ |
| 138 | βββββββββββββββββ\n\ |
| 139 | βββββββββββββββββ" |
| 140 | ); |
| 141 | } |