fav_utils 0.0.15

Fav's utils crate; A collection of utilities and data structures for the fav project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::error::FavUtilsResult;
use qrcode::{render::unicode, QrCode};

pub fn show_qr_code(url: String) -> FavUtilsResult<()> {
    let code = QrCode::new(url).unwrap();
    let image = code
        .render::<unicode::Dense1x2>()
        .dark_color(unicode::Dense1x2::Light)
        .light_color(unicode::Dense1x2::Dark)
        .build();
    println!("\n{}", image);
    Ok(())
}