Use closures for QRCode::style
This commit is contained in:
parent
afd138dba6
commit
6741630218
2 changed files with 16 additions and 14 deletions
|
|
@ -391,9 +391,11 @@ where
|
|||
/// [`QRCode`]: crate::QRCode
|
||||
/// [`Data`]: crate::qr_code::Data
|
||||
#[cfg(feature = "qr_code")]
|
||||
pub fn qr_code<Theme>(data: &crate::qr_code::Data) -> crate::QRCode<'_, Theme>
|
||||
pub fn qr_code<'a, Theme>(
|
||||
data: &'a crate::qr_code::Data,
|
||||
) -> crate::QRCode<'a, Theme>
|
||||
where
|
||||
Theme: crate::qr_code::DefaultStyle,
|
||||
Theme: crate::qr_code::DefaultStyle + 'a,
|
||||
{
|
||||
crate::QRCode::new(data)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue