cargo fmt

This commit is contained in:
Henry Schimke
2023-02-04 13:13:37 -06:00
parent 92f15be032
commit 9d01d43e1a
4 changed files with 10 additions and 6 deletions

View File

@@ -126,7 +126,7 @@ pub fn parse_result_with_parser<F: Fn(&RXingResult) -> Option<ParsedClientResult
the_rxing_result: &RXingResult,
parser: F,
) -> Option<ParsedClientResult> {
parser(the_rxing_result)
parser(the_rxing_result)
}
pub fn parseRXingResult(the_rxing_result: &RXingResult) -> ParsedClientResult {

View File

@@ -61,7 +61,11 @@ pub fn parse(result: &RXingResult) -> Option<ParsedClientResult> {
// Check up front if this is a URI syntax string with query arguments
if let Some(name_value_pairs) = ResultParser::parseNameValuePairs(&raw_text) {
if !name_value_pairs.is_empty() {
subject = String::from(name_value_pairs.get("subject").unwrap_or(&String::default()));
subject = String::from(
name_value_pairs
.get("subject")
.unwrap_or(&String::default()),
);
body = String::from(name_value_pairs.get("body").unwrap_or(&String::default()));
querySyntax = true;
}

View File

@@ -16,8 +16,6 @@
//package com.google.zxing;
use crate::Exceptions;
/**

View File

@@ -96,8 +96,10 @@ impl<'a> Detector<'_> {
// resultPointCallback = hints == null ? null :
// (RXingResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
let mut finder =
FinderPatternFinder::with_callback(self.image.clone(), self.resultPointCallback.clone());
let mut finder = FinderPatternFinder::with_callback(
self.image.clone(),
self.resultPointCallback.clone(),
);
let info = finder.find(hints)?;
self.processFinderPatternInfo(info)