Repository navigation
Write the type codes once, and split the formatting of values into functions of their own - #133
Merged
Merged
Conversation
…es once - Find the column type of a byte in KNOWN by to_byte, which is now the only place that gives the bytes, rather than in a second match of them - Find the object type of a number in ObjectType::ALL by its discriminant - Put the column types of the same fixed size in one arm of fixed_size - Test that KNOWN holds every column type, with a match that fails to compile when a type is added Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…g into the string - Push what a directive gives in push_directive, which writes into the string rather than push a string made for each part Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Make the digits first, and then put the sign before them in one place rather than in both branches Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tion of its own - Find the columns with column_index, and read the IDs of a row with link_id and ComplexLink::of - Read the 32-bit numbers of an attachment with a function rather than a closure Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rite - Choose the columns, write the header and read the complex columns in functions of their own - Write the fields of Yes/No, binary and Date/Time values, and the items of attachments, in functions of their own Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CoverageFor 7ab87d2. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ColumnType::to_byteand inTryFrom<u8>.TryFrom<u8>now finds the type inColumnType::KNOWNbyto_byte, and a test with a match over every column type fails to compile when a type is added and not placed inKNOWN.TryFrom<i32>ofObjectTypefinds the type inObjectType::ALLby its discriminant, so the numbers are written only in the enum.fixed_sizehas the types of the same size in one arm.format_timestampreads a directive in a function of its own and writes the parts into the string, rather than make a string for each part.numeric_to_stringputs the sign in one place.find_linkof complex.rs finds its columns withtable::column_indexand reads a row withComplexLink::of.write_csvchooses the columns, writes the header and reads the complex columns in functions of their own, and the fields of Yes/No, binary and Date/Time values and the items of attachments are functions of their own.format_valueof csv.rs is still above them (CC 14), as a match over the fifteen kinds ofValue, andColumnType::to_byteis kept as the match that gives the bytes.ColumnType::try_fromColumnType::fixed_sizeObjectType::try_fromformat_timestampnumeric_to_stringfind_linkdecode_attachmentwrite_csvcomplex_fieldformat_value🤖 Generated with Claude Code