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

update planus version and regenerate code #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Liyixin95
Copy link

Update planus from 0.3.x to 0.4.x will simplify the conversion from BlockRef to Block.

This is 0.4.x version:

impl<'a> ::core::convert::From<BlockRef<'a>> for Block {
          #[allow(unreachable_code)]
          fn from(value: BlockRef<'a>) -> Self {
              Self {
                  offset: value.offset(),
                  meta_data_length: value.meta_data_length(),
                  body_length: value.body_length(),
              }
          }
      }

This is 0.3.x version:

impl<'a> ::core::convert::TryFrom<BlockRef<'a>> for Block {
                        type Error = ::planus::Error;

                        #[allow(unreachable_code)]
                        fn try_from(value: BlockRef<'a>) -> ::planus::Result<Self> {
                            ::core::result::Result::Ok(Block {
                                offset: value.offset(),
                                meta_data_length: value.meta_data_length(),
                                body_length: value.body_length(),
                            })
                        }
                    }

This will simplify the deserialize_footer function in arrow2 a little bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant