mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
cargo fmt
This commit is contained in:
@@ -544,10 +544,12 @@ fn testPadding() {
|
||||
fn encodeHighLevelWithSizes(msg: &str, sizes: &mut [usize]) {
|
||||
sizes[0] = high_level_encoder::encodeHighLevel(msg)
|
||||
.expect("encodes")
|
||||
.chars().count();
|
||||
.chars()
|
||||
.count();
|
||||
sizes[1] = minimal_encoder::encodeHighLevel(msg)
|
||||
.expect("encodes")
|
||||
.chars().count();
|
||||
.chars()
|
||||
.count();
|
||||
}
|
||||
|
||||
fn encodeHighLevel(msg: &str) -> String {
|
||||
@@ -557,7 +559,12 @@ fn encodeHighLevel(msg: &str) -> String {
|
||||
fn encodeHighLevelCompare(msg: &str, compareSizeToMinimalEncoder: bool) -> String {
|
||||
let encoded = high_level_encoder::encodeHighLevel(msg).expect("encodes");
|
||||
let encoded2 = minimal_encoder::encodeHighLevel(msg).expect("encodes");
|
||||
assert!(!compareSizeToMinimalEncoder || encoded2.chars().count() <= encoded.chars().count(), "{} <= {}", encoded2.chars().count() , encoded.chars().count());
|
||||
assert!(
|
||||
!compareSizeToMinimalEncoder || encoded2.chars().count() <= encoded.chars().count(),
|
||||
"{} <= {}",
|
||||
encoded2.chars().count(),
|
||||
encoded.chars().count()
|
||||
);
|
||||
visualize(&encoded)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user