mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-28 05:12:34 +00:00
cargo fmt
This commit is contained in:
@@ -61,7 +61,11 @@ pub fn parse(result: &RXingResult) -> Option<ParsedClientResult> {
|
|||||||
// Check up front if this is a URI syntax string with query arguments
|
// Check up front if this is a URI syntax string with query arguments
|
||||||
if let Some(name_value_pairs) = ResultParser::parseNameValuePairs(&raw_text) {
|
if let Some(name_value_pairs) = ResultParser::parseNameValuePairs(&raw_text) {
|
||||||
if !name_value_pairs.is_empty() {
|
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()));
|
body = String::from(name_value_pairs.get("body").unwrap_or(&String::default()));
|
||||||
querySyntax = true;
|
querySyntax = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
//package com.google.zxing;
|
//package com.google.zxing;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use crate::Exceptions;
|
use crate::Exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -96,8 +96,10 @@ impl<'a> Detector<'_> {
|
|||||||
// resultPointCallback = hints == null ? null :
|
// resultPointCallback = hints == null ? null :
|
||||||
// (RXingResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
|
// (RXingResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
|
||||||
|
|
||||||
let mut finder =
|
let mut finder = FinderPatternFinder::with_callback(
|
||||||
FinderPatternFinder::with_callback(self.image.clone(), self.resultPointCallback.clone());
|
self.image.clone(),
|
||||||
|
self.resultPointCallback.clone(),
|
||||||
|
);
|
||||||
let info = finder.find(hints)?;
|
let info = finder.find(hints)?;
|
||||||
|
|
||||||
self.processFinderPatternInfo(info)
|
self.processFinderPatternInfo(info)
|
||||||
|
|||||||
Reference in New Issue
Block a user