Skip to content

various improvements for XDR code generation #6

Description

@bertschinger
  • Helpers: consider moving the helpers to a library that has to be included, rather than adding them into the generated code
    • benefits: deserializeError type doesn't get duplicated in each module, dead code warning isn't necessary for modules that don't use all the helpers
  • Fix use std::os::unix::ffi::OsStrExt; being added for XDR schemas that don't need it (schema that has something like typedef string FileName<>; but no objects use FileName)
    • or just don't worry about this? Fix the schema?
  • input parameter to deserialize method (signature like pub fn deserialize(&mut self, mut input: &mut &[u8]) -> Result<(), helpers::DeserializeError>: in some cases this needs to be mutable (mut input: &mut ...) and in some cases it doesn't. (input: &mut ...).
    • This leads to warnings if it's always marked as mutable when some methods don't need that. Better way to handle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions