Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax header string parsing #98

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 64 additions & 64 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
max_width = 100
hard_tabs = false
tab_spaces = 4
newline_style = "Auto"
indent_style = "Block"
use_small_heuristics = "Default"
fn_call_width = 60
attr_fn_like_width = 70
struct_lit_width = 18
struct_variant_width = 35
array_width = 60
attr_fn_like_width = 70
binop_separator = "Front"
blank_lines_lower_bound = 0
blank_lines_upper_bound = 1
brace_style = "SameLineWhere"
chain_width = 60
single_line_if_else_max_width = 50
single_line_let_else_max_width = 50
wrap_comments = false
format_code_in_doc_comments = false
doc_comment_code_block_width = 100
color = "Auto"
combine_control_expr = true
comment_width = 80
normalize_comments = false
normalize_doc_attributes = false
format_strings = false
format_macro_matchers = false
format_macro_bodies = true
skip_macro_invocations = []
hex_literal_case = "Preserve"
condense_wildcard_suffixes = false
control_brace_style = "AlwaysSameLine"
disable_all_formatting = false
doc_comment_code_block_width = 100
edition = "2021"
emit_mode = "Files"
empty_item_single_line = true
struct_lit_single_line = true
enum_discrim_align_threshold = 0
error_on_line_overflow = false
error_on_unformatted = false
fn_call_width = 60
fn_params_layout = "Tall"
fn_single_line = false
where_single_line = false
force_explicit_abi = true
force_multiline_blocks = false
format_code_in_doc_comments = false
format_generated_files = true
format_macro_bodies = true
format_macro_matchers = false
format_strings = false
group_imports = "One"
hard_tabs = false
hex_literal_case = "Preserve"
ignore = []
imports_granularity = "Crate"
imports_indent = "Block"
imports_layout = "Mixed"
imports_granularity = "Crate"
group_imports = "One"
indent_style = "Block"
inline_attribute_width = 0
make_backup = false
match_arm_blocks = true
match_arm_leading_pipes = "Never"
match_block_trailing_comma = false
max_width = 100
merge_derives = true
newline_style = "Auto"
normalize_comments = false
normalize_doc_attributes = false
overflow_delimited_expr = false
remove_nested_parens = true
reorder_impl_items = false
reorder_imports = true
reorder_modules = true
reorder_impl_items = false
type_punctuation_density = "Wide"
space_before_colon = false
required_version = "1.8.0"
short_array_element_width_threshold = 10
show_parse_errors = true
single_line_if_else_max_width = 50
single_line_let_else_max_width = 50
skip_children = false
skip_macro_invocations = []
space_after_colon = true
space_before_colon = false
spaces_around_ranges = false
binop_separator = "Front"
remove_nested_parens = true
combine_control_expr = true
short_array_element_width_threshold = 10
overflow_delimited_expr = false
struct_field_align_threshold = 0
enum_discrim_align_threshold = 0
match_arm_blocks = true
match_arm_leading_pipes = "Never"
force_multiline_blocks = false
fn_params_layout = "Tall"
brace_style = "SameLineWhere"
control_brace_style = "AlwaysSameLine"
trailing_semicolon = true
struct_lit_single_line = true
struct_lit_width = 18
struct_variant_width = 35
style_edition = "2021"
tab_spaces = 4
trailing_comma = "Vertical"
match_block_trailing_comma = false
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
edition = "2015"
version = "One"
inline_attribute_width = 0
format_generated_files = true
merge_derives = true
use_try_shorthand = false
use_field_init_shorthand = false
force_explicit_abi = true
condense_wildcard_suffixes = false
color = "Auto"
required_version = "1.7.1"
trailing_semicolon = true
type_punctuation_density = "Wide"
unstable_features = false
disable_all_formatting = false
skip_children = false
show_parse_errors = true
error_on_line_overflow = false
error_on_unformatted = false
ignore = []
emit_mode = "Files"
make_backup = false
use_field_init_shorthand = false
use_small_heuristics = "Default"
use_try_shorthand = false
where_single_line = false
wrap_comments = false
9 changes: 2 additions & 7 deletions src/header/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,14 @@ impl Builder {
generating_software: raw_header
.generating_software
.as_ref()
.as_las_str()?
.to_string(),
.as_las_string_lossy(),
gps_time_type: raw_header.global_encoding.into(),
guid: Uuid::from_bytes(raw_header.guid),
has_synthetic_return_numbers: raw_header.global_encoding & 8 == 8,
has_wkt_crs: raw_header.global_encoding & 16 == 16,
padding: raw_header.padding,
point_format,
system_identifier: raw_header
.system_identifier
.as_ref()
.as_las_str()?
.to_string(),
system_identifier: raw_header.system_identifier.as_ref().as_las_string_lossy(),
transforms: Vector {
x: Transform {
scale: raw_header.x_scale_factor,
Expand Down