mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
cargo fmt
This commit is contained in:
@@ -101,15 +101,9 @@ pub fn decode(bytes: &[u8], mode: u8) -> Result<DecoderRXingResult, Exceptions>
|
||||
let service = format!("{:0>3}", getServiceClass(bytes));
|
||||
result.push_str(&getMessage(bytes, 10, 84));
|
||||
if result.starts_with(&format!("[)>{}{}{}", RS, "01", GS)) {
|
||||
result.insert_str(
|
||||
9,
|
||||
&format!("{postcode}{GS}{country}{GS}{service}{GS}"),
|
||||
);
|
||||
result.insert_str(9, &format!("{postcode}{GS}{country}{GS}{service}{GS}"));
|
||||
} else {
|
||||
result.insert_str(
|
||||
0,
|
||||
&format!("{postcode}{GS}{country}{GS}{service}{GS}"),
|
||||
);
|
||||
result.insert_str(0, &format!("{postcode}{GS}{country}{GS}{service}{GS}"));
|
||||
}
|
||||
}
|
||||
4 => {
|
||||
|
||||
@@ -141,7 +141,7 @@ impl<'a> Circle<'_> {
|
||||
let mut lengths = [(0, 0.0, [(0.0_f32, 0.0); 2]); 72];
|
||||
let mut circle_points = Vec::new();
|
||||
// for i_rotation in 0..72 {
|
||||
for (i_rotation, length_set) in lengths.iter_mut().enumerate(){
|
||||
for (i_rotation, length_set) in lengths.iter_mut().enumerate() {
|
||||
let rotation = i_rotation as f32 * 5.0;
|
||||
let (length, points) = self.find_width_at_degree(rotation);
|
||||
circle_points.extend_from_slice(&points);
|
||||
|
||||
Reference in New Issue
Block a user