GithubHelp home page GithubHelp logo

Comments (6)

bbustin avatar bbustin commented on August 19, 2024

Hi @Bas-Man. I agree, there are a lot of areas this could be improved. I really hacked it together quickly while initially learning Rust. Your help is much appreciated. Removing the panics and unwraps would be great.

I incorrectly closed the pull request about making parse_reader private. You are correct. It should not be public. I mis-read it as parse and closed the pull request. I will try to re-open and merge it. Sorry about that...

The second pull request is also a good one. Ideally parse_dir would not try to parse files that are not .xml, .gz, or .zip. But for now making this change is a good idea.

from dmarc_aggregate_parser.

Bas-Man avatar Bas-Man commented on August 19, 2024

Yes. Ideally parse_dir would only parse valid files. The [should_panic] is a temp fix to get all tests passing including the panic.

I am already thinking about how to resolve the parse_dir so that it does not actually panic.

But moving step by step to avoid conflicts.

I also would like to make most of the struct data private with accessors. But that might be over engineering.

from dmarc_aggregate_parser.

Bas-Man avatar Bas-Man commented on August 19, 2024

@bbustin could you point to a good source of demarc samples.

from dmarc_aggregate_parser.

bbustin avatar bbustin commented on August 19, 2024

I do not know a good source of samples, unfortunately. I was just using ones I was receiving on my mail server from Google, Yahoo, and other places.

from dmarc_aggregate_parser.

Bas-Man avatar Bas-Man commented on August 19, 2024

No worries. I will work with what we have.

I would like to remove the guard in parse_dir()

The path.is_dir() {}
This appears to be preventing any IO errors from being returned. This is because it evaluates before any IO operations. At least from what I have tried. When it is removed. IO errors are returned for unreadable files and directories.

from dmarc_aggregate_parser.

bbustin avatar bbustin commented on August 19, 2024

👍

from dmarc_aggregate_parser.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.