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

Multiple improvements across multiple forks #49

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

Hessesian
Copy link

I have tracked several improvements that went into multiple forks and added some of my own, including:

  • added newline in the in memory buffer
  • fixed migration issues across new versions of libraries
  • added new sources of input to read from

I understand it's a lot of changes that are not fully coherent, and can't vouch for all of them, but I'm open to cherry picks or suggestions

badicsalex and others added 28 commits August 20, 2022 13:16
Instaed of deleting them, because they may become useful in the future
Mostly trivial changes, but unfortunately there's no way to know what I
broke, because there are no tests.
This way a depending project does not need to directly depend on lopdf.
It seems like a silly workaround with no real consequences anyway.
}
}

fn as_num(o: &Object) -> f64 {
match *o {
Object::Integer(i) => i as f64,
Object::Real(f) => f,
Object::Real(f) => f.into(),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the build error being fixed here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f is of type f32, but signature wants f64, so this will convert into it

@joepio
Copy link
Contributor

joepio commented Feb 12, 2023

@Hessesian since we both opened a PR in the last 24 hours with a lot of changes, and we're both keen on working on this project, maybe we should collaborate and try to merge our changes.

Stuff we both do:

  • We both seem to have run rustfmt and clippy, so many changes will overlap
  • Re-export lopdf
  • Fix some of the panics

Stuff only your PR changes:

Stuff only my PR changes:

  • Error handling (this is the biggest change by far). I have made many changes to lib.rs, including a lot of function signatures. That was a time-consuming task. As far as I can see, it looks like most changes from your PR to lib.rs are linting related. Is that right? If that's the case, I think it makes sense to take my lib.rs as a staring point.
  • Tests
  • Readme

@Hessesian
Copy link
Author

Sure, seems to be wise to create separate pull request first for the formatting changes and common issues resolved, make sure it works and then we can do separate PR's for individual features that can be tweaked.

Can you maybe go ahead with your changes that don't clash ?

@joepio
Copy link
Contributor

joepio commented Feb 13, 2023

@Hessesian Is possible, but I'd prefer it if my PR was merged and we than cherry pick commits from yours. I'd gladly do that, but I want to know if the changes are OK to merge. @jrmuizel what is your opinion on this?

Might be useful to have a short video meet about all of this if you want. Reach me at [email protected]

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.

6 participants