msiemens / onenote.rs

A Rust OneNote file parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation error

werdahias opened this issue · comments

I am unable to compile the project.

OS: Debian testing
rustc: 1.56.0

Error message:

error[E0308]: mismatched types
  --> src/reader.rs:44:9
   |
43 |     pub(crate) fn bytes(&self) -> &[u8] {
   |                                   ----- expected `&[u8]` because of return type
44 |         self.0.bytes()
   |         ^^^^^^^^^^^^^^ expected `&[u8]`, found struct `std::io::Bytes`
   |
   = note: expected reference `&[u8]`
                 found struct `std::io::Bytes<&[u8]>`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `onenote_parser` due to previous error

Hey @CountOmega, I've tried to reproduce this with Debian Testing (bookworm/sid) and Rust 1.56.0 and both the latest master branch as well as the v0.3.0 version compile just fine for me. Can you verify you're using the latest version? Have you maybe modified the source code, maybe by accident?

Yeah it worked with re-cloning and rebuilding, no idea why. Can I contribute for support of .one files exported out of the desktop application?

Yeah it worked with re-cloning and rebuilding, no idea why

Strange. But glad you've got it to work 🙂

Can I contribute for support of .one files exported out of the desktop application?

Absolutely! I'm thankful for every contribution!

Can you provide me with some kind of documentation for the .one 2016 file format?

Sure! The main source is in https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-onestore/ae670cd2-4b38-4b24-82d1-87cfb2cc3725 which describes the Microsoft OneNote Revision Store File Format. Basically this is the container format that OneNote data is stored in. There is also an existing project called LibMsON which implements the OneNote 2016 file format in C++ and helped me understand how OneNote data is structured and arranged (even if the details differ in the OneNote FSSHTTP packaging format).