Skip to content

Cannot use sheets from branch sheets/saint-coinach with branch main's excel. #26

@IAMSolaara

Description

@IAMSolaara

Hello,
I updated a project of mine to use ironworks' main branch and need to use Excel sheets.

Using let sheet = excel.sheet(for_type::<ironworks_sheets::sheet::LogMessage>())?; gives compile-time errors because of SheetType not implementing the Display trait.

This is the error message I get:

error[E0277]: `ironworks_sheets::metadata::SheetType<LogMessage>` doesn't implement `std::fmt::Display`
  --> src/main.rs:32:29
   |
32 |     let sheet = excel.sheet(for_type::<ironworks_sheets::sheet::LogMessage>())?;
   |                       ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ironworks_sheets::metadata::SheetType<LogMessage>` cannot be formatted with the default formatter
   |                       |
   |                       required by a bound introduced by this call
   |
   = help: the trait `std::fmt::Display` is not implemented for `ironworks_sheets::metadata::SheetType<LogMessage>`, which is required by `ironworks_sheets::metadata::SheetType<LogMessage>: SheetMetadata`
   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
   = note: required for `ironworks_sheets::metadata::SheetType<LogMessage>` to implement `ToString`
   = note: required for `ironworks_sheets::metadata::SheetType<LogMessage>` to implement `SheetMetadata`
note: required by a bound in `Excel::<'i>::sheet`
  --> /Users/evermore/Workspace/Code/scratch/ironworks/ironworks/src/excel/excel.rs:89:18
   |
89 |     pub fn sheet<S: SheetMetadata>(&self, sheet_metadata: S) -> Result<Sheet<'i, S>> {
   |                     ^^^^^^^^^^^^^ required by this bound in `Excel::<'i>::sheet`

For more information about this error, try `rustc --explain E0277`.

Is this a known problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions