msiemens / onenote.rs

A Rust OneNote file parser
Mozilla Public License 2.0
52 stars 16 forks source link

Compilation error #8

Open werdahias opened 2 years ago

werdahias commented 2 years ago

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
msiemens commented 2 years ago

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?

werdahias commented 2 years ago

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?

msiemens commented 2 years ago

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!

werdahias commented 2 years ago

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

msiemens commented 2 years ago

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).