add necessary declarations to build wihtout images

This commit is contained in:
Henry Schimke
2023-01-13 10:26:08 -06:00
parent 24cb4d1090
commit 89d02c7ab1
6 changed files with 16 additions and 2 deletions

View File

@@ -8,11 +8,14 @@ use std::{
use crate::{
common::{BitMatrix, HybridBinarizer},
multi::{GenericMultipleBarcodeReader, MultipleBarcodeReader},
BarcodeFormat, BinaryBitmap, BufferedImageLuminanceSource, DecodeHintType, DecodeHintValue,
BarcodeFormat, BinaryBitmap, DecodeHintType, DecodeHintValue,
DecodingHintDictionary, Exceptions, Luma8LuminanceSource, MultiFormatReader, RXingResult,
Reader,
};
#[cfg(feature="image")]
use crate::BufferedImageLuminanceSource;
#[cfg(feature = "svg_read")]
pub fn detect_in_svg(
file_name: &str,
@@ -281,6 +284,8 @@ pub fn save_file(file_name: &str, bit_matrix: &BitMatrix) -> Result<(), Exceptio
String::default()
};
let _ = &ext;
#[cfg(feature = "svg_write")]
if ext == "svg" {
return save_svg(file_name, bit_matrix);